From 55ec91cab7d1f5ebd4ad0758348cad7a8d797704 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Fri, 20 Sep 2019 08:39:21 +0200 Subject: [PATCH] Update patch --- ...2.3-nopip.patch => pybind11-2.4.0-nopip.patch | 16 ++++++++++++---- pybind11.spec | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) rename pybind11-2.2.3-nopip.patch => pybind11-2.4.0-nopip.patch (62%) diff --git a/pybind11-2.2.3-nopip.patch b/pybind11-2.4.0-nopip.patch similarity index 62% rename from pybind11-2.2.3-nopip.patch rename to pybind11-2.4.0-nopip.patch index 13a6706..0ace618 100644 --- a/pybind11-2.2.3-nopip.patch +++ b/pybind11-2.4.0-nopip.patch @@ -1,7 +1,7 @@ -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 @@ +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 - @@ -14,9 +14,17 @@ diff -up pybind11-2.2.3/pybind11/__init__.py.orig pybind11-2.2.3/pybind11/__init - 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() 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