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.

Author robotron
Recipients eric.araujo, robotron, tarek
Date 2013-10-25.18:00:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382724028.67.0.461727040571.issue19394@psf.upfronthosting.co.za>
In-reply-to
Content
When empty string element is passed in include_dirs or library_dirs (e.g. include_dirs = [""]) param of distutils.core.Extension constructor, it is propagated to compiler/linker params and in the case of gcc it eats subsequent command line option.

setup.py excerpt:

---
extensions = [
    Extension("test_extension", ["test_extension.cpp"],
        include_dirs = [""],
        libraries = ["rt"],
        library_dirs = [""],
        )
]
---

$ python setup.py build
...
gcc ... -I -I/usr/include/python2.7 -c test_extension.cpp ...

Standard include dir "/usr/include/python2.7" is ommited now. The same is valid for library_dirs.

Example scripts attached.
History
Date User Action Args
2013-10-25 18:00:28robotronsetrecipients: + robotron, tarek, eric.araujo
2013-10-25 18:00:28robotronsetmessageid: <1382724028.67.0.461727040571.issue19394@psf.upfronthosting.co.za>
2013-10-25 18:00:28robotronlinkissue19394 messages
2013-10-25 18:00:28robotroncreate