Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3aa9eed

Browse files
committed
BLD: Include conda dirs in basedir
conda installs includes/libs in <env_dir>\Library, so adding this dir makes installing under conda much easier.
1 parent 94d9075 commit 3aa9eed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setupext.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,15 @@ def get_base_dirs():
126126
"""
127127
if options['basedirlist']:
128128
return options['basedirlist']
129-
129+
130+
win_bases = ['win32_static', ]
131+
# on windows, we also add the <installdir>\Library of the local interperter, as
132+
# conda installs libs/includes there
133+
if os.getenv('CONDA_DEFAULT_ENV'):
134+
win_bases.append(os.path.join(os.getenv('CONDA_DEFAULT_ENV'), "Library"))
135+
130136
basedir_map = {
131-
'win32': ['win32_static', ],
137+
'win32': win_bases,
132138
'darwin': ['/usr/local/', '/usr', '/usr/X11',
133139
'/opt/X11', '/opt/local'],
134140
'sunos5': [os.getenv('MPLIB_BASE') or '/usr/local', ],

0 commit comments

Comments
 (0)