This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: swig support in distutils should use the build and temp dirs
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: tarek Nosy List: Jeff.Laughlin, afflux, akitada, loewis, reowen, steve.dower, tarek
Priority: normal Keywords: patch

Created on 2008-04-12 12:53 by afflux, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
python_distutils+swig.patch afflux, 2008-04-13 18:33 patch
Messages (8)
msg65399 - (view) Author: Kjell Braden (afflux) Date: 2008-04-12 12:53
Distutils should tell swig to create it's C wrapper file into the
temporary directory (eg. build/temp.linux-i686-2.5) and to write the
language specific files to the library directory (eg.

Without the language specific files, python swig extensions won't be
able to run, so they should definetly be distributed by distutils.
The wrapper files are build by-products and should therefore be in the
temporary directory, so they get cleaned up on " clean".
msg65401 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-04-12 13:57
Can you provide a patch?
msg65402 - (view) Author: Kjell Braden (afflux) Date: 2008-04-12 14:34
Without having it tested very much, the attached patch fixes this issue
for me.
msg65440 - (view) Author: Kjell Braden (afflux) Date: 2008-04-13 09:35
Note that the language specific files can't be handled via py_modules
because this is processed before their generation.
msg65449 - (view) Author: Kjell Braden (afflux) Date: 2008-04-13 18:33
I noticed that my patch did not work for absolute directory names and
adjusted the matching to fix this.
msg81408 - (view) Author: Akira Kitada (akitada) * Date: 2009-02-08 19:03
Same with issue1016626?
msg81416 - (view) Author: Kjell Braden (afflux) Date: 2009-02-08 20:20
Except that the _wrap.c file would still be created at the wrong place,
yes, you're right.
msg386452 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:37
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:56:33adminsetgithub: 46876
2021-02-03 18:37:46steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386452

resolution: out of date
stage: resolved
2010-12-03 21:03:53Jeff.Laughlinsetnosy: + Jeff.Laughlin
2010-08-19 16:08:22BreamoreBoysetversions: + Python 3.2
2009-12-17 00:44:40reowensetnosy: + reowen
2009-02-13 09:02:52tareksetpriority: normal
2009-02-08 20:20:38affluxsetmessages: + msg81416
2009-02-08 19:03:28akitadasetnosy: + akitada
messages: + msg81408
2009-02-06 09:14:22tareksetassignee: tarek
versions: + Python 3.1, Python 2.7, - Python 2.5
nosy: + tarek
2008-04-13 18:34:18affluxsetcomponents: + Distutils, - Demos and Tools
2008-04-13 18:33:58affluxsetfiles: + python_distutils+swig.patch
messages: + msg65449
2008-04-13 18:32:17affluxsetfiles: - python_distutils+swig.patch
2008-04-13 09:35:39affluxsetmessages: + msg65440
2008-04-12 14:34:13affluxsetfiles: + python_distutils+swig.patch
keywords: + patch
messages: + msg65402
2008-04-12 13:57:48loewissetnosy: + loewis
messages: + msg65401
2008-04-12 12:53:23affluxcreate