From 2b72092c1cabe785fe117de089b5d42a85cead8a Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Aug 02 2022 21:12:15 +0000 Subject: Update patch --- diff --git a/pybind11-2.10.0-hpath.patch b/pybind11-2.10.0-hpath.patch new file mode 100644 index 0000000..e76a53d --- /dev/null +++ b/pybind11-2.10.0-hpath.patch @@ -0,0 +1,24 @@ +diff -up pybind11-2.10.0/pybind11/commands.py.hpath pybind11-2.10.0/pybind11/commands.py +--- pybind11-2.10.0/pybind11/commands.py.hpath 2022-08-02 21:10:36.582025308 +0000 ++++ pybind11-2.10.0/pybind11/commands.py 2022-08-02 21:11:27.826124432 +0000 +@@ -8,18 +8,11 @@ def get_include(user: bool = False) -> s + Return the path to the pybind11 include directory. The historical "user" + argument is unused, and may be removed. + """ +- installed_path = os.path.join(DIR, "include") +- source_path = os.path.join(os.path.dirname(DIR), "include") +- return installed_path if os.path.exists(installed_path) else source_path ++ return '/usr/include/pybind11' + + + def get_cmake_dir() -> str: + """ + Return the path to the pybind11 CMake module directory. + """ +- cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11") +- if os.path.exists(cmake_installed_path): +- return cmake_installed_path +- +- msg = "pybind11 not installed, installation required to access the CMake files" +- raise ImportError(msg) ++ return '/usr/share/cmake/pybind11' diff --git a/pybind11-2.8.1-hpath.patch b/pybind11-2.8.1-hpath.patch deleted file mode 100644 index 5ed3314..0000000 --- a/pybind11-2.8.1-hpath.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up pybind11-2.8.1/pybind11/commands.py.hpath pybind11-2.8.1/pybind11/commands.py ---- pybind11-2.8.1/pybind11/commands.py.hpath 2021-11-26 18:39:36.765399461 +0000 -+++ pybind11-2.8.1/pybind11/commands.py 2021-11-26 18:40:24.924543543 +0000 -@@ -5,17 +5,7 @@ DIR = os.path.abspath(os.path.dirname(__ - - - def get_include(user=False): -- # type: (bool) -> str -- installed_path = os.path.join(DIR, "include") -- source_path = os.path.join(os.path.dirname(DIR), "include") -- return installed_path if os.path.exists(installed_path) else source_path -- -+ return '/usr/include/pybind11' - - def get_cmake_dir(): -- # type: () -> str -- cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11") -- if os.path.exists(cmake_installed_path): -- return cmake_installed_path -- else: -- msg = "pybind11 not installed, installation required to access the CMake files" -- raise ImportError(msg) -+ return '/usr/share/cmake/pybind11' diff --git a/pybind11.spec b/pybind11.spec index 57a2c71..5035d2e 100644 --- a/pybind11.spec +++ b/pybind11.spec @@ -24,7 +24,7 @@ URL: https://github.com/pybind/pybind11 Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz # Patch out header path -Patch1: pybind11-2.8.1-hpath.patch +Patch1: pybind11-2.10.0-hpath.patch BuildRequires: make %if %{python2_enabled}