2019-09-20 06:39:21 +00:00
|
|
|
diff -up pybind11-2.4.0/pybind11/__init__.py.nopip pybind11-2.4.0/pybind11/__init__.py
|
|
|
|
--- pybind11-2.4.0/pybind11/__init__.py.nopip 2019-09-19 23:06:22.000000000 +0200
|
|
|
|
+++ pybind11-2.4.0/pybind11/__init__.py 2019-09-20 08:38:31.351226101 +0200
|
|
|
|
@@ -1,36 +1,4 @@
|
2018-06-22 12:47:15 +00:00
|
|
|
from ._version import version_info, __version__ # noqa: F401 imported but unused
|
|
|
|
|
|
|
|
-
|
|
|
|
def get_include(user=False):
|
|
|
|
- from distutils.dist import Distribution
|
|
|
|
- import os
|
|
|
|
- import sys
|
|
|
|
-
|
|
|
|
- # Are we running in a virtual environment?
|
|
|
|
- virtualenv = hasattr(sys, 'real_prefix') or \
|
|
|
|
- sys.prefix != getattr(sys, "base_prefix", sys.prefix)
|
|
|
|
-
|
2019-09-20 06:39:21 +00:00
|
|
|
- # Are we running in a conda environment?
|
|
|
|
- conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta'))
|
|
|
|
-
|
2018-06-22 12:47:15 +00:00
|
|
|
- if virtualenv:
|
|
|
|
- return os.path.join(sys.prefix, 'include', 'site',
|
|
|
|
- 'python' + sys.version[:3])
|
2019-09-20 06:39:21 +00:00
|
|
|
- elif conda:
|
|
|
|
- if os.name == 'nt':
|
|
|
|
- return os.path.join(sys.prefix, 'Library', 'include')
|
|
|
|
- else:
|
|
|
|
- return os.path.join(sys.prefix, 'include')
|
2018-06-22 12:47:15 +00:00
|
|
|
- else:
|
|
|
|
- dist = Distribution({'name': 'pybind11'})
|
|
|
|
- dist.parse_config_files()
|
|
|
|
-
|
|
|
|
- dist_cobj = dist.get_command_obj('install', create=True)
|
|
|
|
-
|
|
|
|
- # Search for packages in user's home directory?
|
|
|
|
- if user:
|
|
|
|
- dist_cobj.user = user
|
|
|
|
- dist_cobj.prefix = ""
|
|
|
|
- dist_cobj.finalize_options()
|
|
|
|
-
|
|
|
|
- return os.path.dirname(dist_cobj.install_headers)
|
|
|
|
+ return '/usr/include/pybind11'
|