[New-bugs-announce] [issue19394] distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed
robotron
report at bugs.python.org
Fri Oct 25 20:00:28 CEST 2013
New submission from robotron:
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.
----------
assignee: eric.araujo
components: Distutils
files: bug_test_case.zip
messages: 201269
nosy: eric.araujo, robotron, tarek
priority: normal
severity: normal
status: open
title: distutils.core.Extension: empty strings in library_dirs and include_dirs should not be allowed
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file32361/bug_test_case.zip
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19394>
_______________________________________
More information about the New-bugs-announce
mailing list