From 55ec91cab7d1f5ebd4ad0758348cad7a8d797704 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Sep 20 2019 06:39:21 +0000 Subject: Update patch --- diff --git a/pybind11-2.2.3-nopip.patch b/pybind11-2.2.3-nopip.patch deleted file mode 100644 index 13a6706..0000000 --- a/pybind11-2.2.3-nopip.patch +++ /dev/null @@ -1,33 +0,0 @@ -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' diff --git a/pybind11-2.4.0-nopip.patch b/pybind11-2.4.0-nopip.patch new file mode 100644 index 0000000..0ace618 --- /dev/null +++ b/pybind11-2.4.0-nopip.patch @@ -0,0 +1,41 @@ +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 @@ + 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) +- +- # Are we running in a conda environment? +- conda = os.path.exists(os.path.join(sys.prefix, 'conda-meta')) +- +- if virtualenv: +- return os.path.join(sys.prefix, 'include', 'site', +- 'python' + sys.version[:3]) +- elif conda: +- if os.name == 'nt': +- return os.path.join(sys.prefix, 'Library', 'include') +- else: +- return os.path.join(sys.prefix, 'include') +- 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' diff --git a/pybind11.spec b/pybind11.spec index 20c94e8..cafadf6 100644 --- a/pybind11.spec +++ b/pybind11.spec @@ -22,7 +22,7 @@ URL: https://github.com/pybind/pybind11 Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz # Don't use pip to get path to headers -Patch1: pybind11-2.2.3-nopip.patch +Patch1: pybind11-2.4.0-nopip.patch %if %{python2_enabled} # Needed to build the python libraries