Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d53f902

Browse filesBrowse files
committed
BLD: Add a way to influence basedirs with env vars
1 parent 3aa9eed commit d53f902
Copy full SHA for d53f902

File tree

Expand file treeCollapse file tree

1 file changed

+10
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-4
lines changed

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,12 @@ def get_base_dirs():
127127
if options['basedirlist']:
128128
return options['basedirlist']
129129

130+
if os.environ.get('MPLBASEDIRLIST'):
131+
return os.environ.get('MPLBASEDIRLIST').split(os.pathsep)
132+
130133
win_bases = ['win32_static', ]
131-
# on windows, we also add the <installdir>\Library of the local interperter, as
132-
# conda installs libs/includes there
134+
# on conda windows, we also add the <installdir>\Library of the local interperter,
135+
# as conda installs libs/includes there
133136
if os.getenv('CONDA_DEFAULT_ENV'):
134137
win_bases.append(os.path.join(os.getenv('CONDA_DEFAULT_ENV'), "Library"))
135138

@@ -149,8 +152,11 @@ def get_include_dirs():
149152
Returns a list of standard include directories on this platform.
150153
"""
151154
include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()]
152-
include_dirs.extend(
153-
os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep))
155+
if sys.platform != 'win32':
156+
# gcc includes this dir automatically, so also look for headers in
157+
# these dirs
158+
include_dirs.extend(
159+
os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep))
154160
return include_dirs
155161

156162

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.