We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 046267c commit 87fa6a4Copy full SHA for 87fa6a4
pybind11/__init__.py
@@ -10,9 +10,17 @@ def get_include(user=False):
10
virtualenv = hasattr(sys, 'real_prefix') or \
11
sys.prefix != getattr(sys, "base_prefix", sys.prefix)
12
13
+ # Are we running in a conda environment?
14
+ conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
15
+
16
if virtualenv:
17
return os.path.join(sys.prefix, 'include', 'site',
18
'python' + sys.version[:3])
19
+ elif conda:
20
+ if os.name == 'nt':
21
+ return os.path.join(sys.prefix, 'Library', 'include')
22
+ else:
23
+ return os.path.join(sys.prefix, 'include')
24
else:
25
dist = Distribution({'name': 'pybind11'})
26
dist.parse_config_files()
0 commit comments