import CS pybind11-2.10.4-2.el9

This commit is contained in:
eabdullin 2025-03-11 08:00:37 +00:00
parent 9a4b6cffd0
commit 977f2febfa
5 changed files with 61 additions and 38 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/pybind11-2.6.2.tar.gz
SOURCES/pybind11-2.10.4.tar.gz

View File

@ -1 +1 @@
e340be2d61439deaf7bdd4bd273bb8c51b713f26 SOURCES/pybind11-2.6.2.tar.gz
5c366a92fc4b3937bcc3389405edbe362b1f3cbd SOURCES/pybind11-2.10.4.tar.gz

View File

@ -0,0 +1,28 @@
diff -uNr pybind11-2.10.1.bak/pybind11/commands.py pybind11-2.10.1/pybind11/commands.py
--- pybind11-2.10.1.bak/pybind11/commands.py 2022-11-07 15:25:26.651515082 -0600
+++ pybind11-2.10.1/pybind11/commands.py 2022-11-07 15:27:01.574703289 -0600
@@ -8,22 +8,13 @@
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'
def get_pkgconfig_dir() -> str:
"""

View File

@ -1,30 +0,0 @@
diff -up pybind11-2.6.1/pybind11/commands.py.hpath pybind11-2.6.1/pybind11/commands.py
--- pybind11-2.6.1/pybind11/commands.py.hpath 2020-11-11 22:33:21.000000000 +0100
+++ pybind11-2.6.1/pybind11/commands.py 2020-11-12 13:22:07.355000414 +0100
@@ -1,22 +1,8 @@
# -*- coding: utf-8 -*-
import os
-
-DIR = os.path.abspath(os.path.dirname(__file__))
-
-
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 -up pybind11-2.6.1/pybind11/__init__.py.hpath pybind11-2.6.1/pybind11/__init__.py
diff -up pybind11-2.6.1/pybind11/__main__.py.hpath pybind11-2.6.1/pybind11/__main__.py

View File

@ -4,6 +4,11 @@
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
%global debug_package %{nil}
%ifarch ppc64le
# The tests are not LTO-compatible on power
%global _lto_cflags %{nil}
%endif
# Whether to run the tests, enabled by default
%bcond_without tests
@ -16,15 +21,15 @@
%global python3_enabled 1
Name: pybind11
Version: 2.6.2
Release: 4%{?dist}
Version: 2.10.4
Release: 2%{?dist}
Summary: Seamless operability between C++11 and Python
License: BSD
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.6.1-hpath.patch
Patch1: pybind11-2.10.1-hpath.patch
BuildRequires: make
%if %{python2_enabled}
@ -65,8 +70,11 @@ C++ code.
%package devel
Summary: Development headers for pybind11
# The manual epoch is set to make this the highest possible EVR
# of pybind11-static across Pythons in RHEL9, to fix RHEL-5571 with RHEL-38108
Epoch: 1
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
Provides: %{name}-static = %{version}-%{release}
Provides: %{name}-static = 1:%{version}-%{release}
Obsoletes: python39-%{name}-devel < %{version}-%{release}
# For dir ownership
Requires: cmake
@ -80,7 +88,7 @@ This package contains the development headers for pybind11.
%package -n python2-%{name}
Summary: %{summary}
%{?python_provide:%python_provide python2-pybind11}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = 1:%{version}-%{release}
%description -n python2-%{name}
%{base_description}
@ -93,7 +101,7 @@ This package contains the Python 2 files.
Summary: %{summary}
%{?python_provide:%python_provide python3-pybind11}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = 1:%{version}-%{release}
%if !%{python2_enabled}
# Take care of upgrade path
@ -167,6 +175,7 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
%{_includedir}/pybind11/
%{_datadir}/cmake/pybind11/
%{_bindir}/pybind11-config
%{_datadir}/pkgconfig/%{name}.pc
%if %{python2_enabled}
%files -n python2-%{name}
@ -181,6 +190,22 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
%endif
%changelog
* Thu Oct 31 2024 Pavel Simovec <psimovec@redhat.com> - 2.10.4-2
- rebuilt
- Resolves: RHEL-62014
* Thu Oct 10 2024 Pavel Simovec <psimovec@redhat.com> - 2.10.4-1
- Update to 2.10.4
- Resolves: RHEL-62014
* Wed Jul 24 2024 Miro Hrončok <mhroncok@redhat.com> - 2.6.2-6
- Introduce epoch to pybind11-devel to sort newer than python3.11-pybind11-devel
- Resolves: RHEL-38108
* Tue Feb 22 2022 Tomas Orsava <torsava@redhat.com> - 2.6.2-5
- Add gating configuration and a simple smoke test
- Related: rhbz#1950291
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 2.6.2-4
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8