pybind11/pybind11-2.2.3-nopip.patch
2018-06-22 14:47:15 +02:00

34 lines
1.2 KiB
Diff

diff -up pybind11-2.2.3/pybind11/__init__.py.orig pybind11-2.2.3/pybind11/__init__.py
--- pybind11-2.2.3/pybind11/__init__.py.orig 2018-06-22 14:45:24.783361962 +0200
+++ pybind11-2.2.3/pybind11/__init__.py 2018-06-22 14:46:31.708289349 +0200
@@ -1,28 +1,4 @@
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)
-
- if virtualenv:
- return os.path.join(sys.prefix, 'include', 'site',
- 'python' + sys.version[:3])
- 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'