mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
Fix missing user dir in python -m pybind11 --includes
For the case of `pip install --user`, the header include dirs must also include `pybind11.get_include(True)`. [skip appveyor]
This commit is contained in:
parent
1913f252d3
commit
3d8df5af03
@ -8,12 +8,18 @@ from . import get_include
|
|||||||
|
|
||||||
|
|
||||||
def print_includes():
|
def print_includes():
|
||||||
dirs = [sysconfig.get_path('include')]
|
dirs = [sysconfig.get_path('include'),
|
||||||
if sysconfig.get_path('platinclude') not in dirs:
|
sysconfig.get_path('platinclude'),
|
||||||
dirs.append(sysconfig.get_path('platinclude'))
|
get_include(),
|
||||||
if get_include() not in dirs:
|
get_include(True)]
|
||||||
dirs.append(get_include())
|
|
||||||
print(' '.join('-I' + d for d in dirs))
|
# Make unique but preserve order
|
||||||
|
unique_dirs = []
|
||||||
|
for d in dirs:
|
||||||
|
if d not in unique_dirs:
|
||||||
|
unique_dirs.append(d)
|
||||||
|
|
||||||
|
print(' '.join('-I' + d for d in unique_dirs))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user