Compare commits

...

No commits in common. "c8-stream-3.9" and "c9s" have entirely different histories.

9 changed files with 201 additions and 81 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

16
.gitignore vendored
View File

@ -1 +1,15 @@
SOURCES/pybind11-2.7.1.tar.gz
/v2.0.1.tar.gz
/pybind11-2.2.1.tar.gz
/pybind11-2.2.2.tar.gz
/pybind11-2.2.3.tar.gz
/pybind11-2.2.4.tar.gz
/pybind11-2.3.0.tar.gz
/pybind11-2.4.0.tar.gz
/pybind11-2.4.1.tar.gz
/pybind11-2.4.2.tar.gz
/pybind11-2.4.3.tar.gz
/pybind11-2.5.0.tar.gz
/pybind11-2.6.0.tar.gz
/pybind11-2.6.1.tar.gz
/pybind11-2.6.2.tar.gz
/pybind11-2.10.4.tar.gz

View File

@ -1 +0,0 @@
8ddca54a17e646aa3e42488b0a0cb250f8b8ed83 SOURCES/pybind11-2.7.1.tar.gz

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

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

11
plans.fmf Normal file
View File

@ -0,0 +1,11 @@
discover:
- name: Smoke-tests
how: shell
tests:
- name: python-import-test
test: python3 -c 'import pybind11'
require:
- python3-pybind11
duration: 1m
execute:
how: tmt

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

@ -4,36 +4,56 @@
# 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
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 9
%global python2_enabled 0
%else
%global python2_enabled 1
%endif
%global python3_enabled 1
Name: pybind11
Version: 2.7.1
Release: 1%{?dist}
Version: 2.10.4
Release: 2%{?dist}
Summary: Seamless operability between C++11 and Python
License: BSD
URL: https://github.com/pybind/pybind11
URL: https://github.com/pybind/pybind11
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
# Patch out header path
Patch1: pybind11-2.6.1-hpath.patch
Patch1: pybind11-2.10.1-hpath.patch
BuildRequires: make
%if %{python2_enabled}
# Needed to build the python libraries
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python2-devel
BuildRequires: python2-setuptools
# These are only needed for the checks
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-numpy
BuildRequires: python%{python3_pkgversion}-scipy
BuildRequires: python2-pytest
BuildRequires: python2-numpy
BuildRequires: python2-scipy
%endif
%endif
%if %{python3_enabled}
# Needed to build the python libraries
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# These are only needed for the checks
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3-numpy
BuildRequires: python3-scipy
%endif
%endif
BuildRequires: eigen3-devel
@ -48,40 +68,51 @@ C++ code.
%description
%{base_description}
%package -n python%{python3_pkgversion}-%{name}-devel
%package devel
Summary: Development headers for pybind11
# This package does not have namespaced file locations, so if we build the
# pybind11-devel subpackage in any other module as well, the files from these
# packages will conflict. The package name is namespaced so that customers can
# decide which to install, but the packages will conflict with each other.
Provides: %{name}-devel = %{version}-%{release}
Conflicts: %{name}-devel < %{version}-%{release}
# 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: python%{python3_pkgversion}-%{name}-static = %{version}-%{release}
Provides: %{name}-static = 1:%{version}-%{release}
Obsoletes: python39-%{name}-devel < %{version}-%{release}
# For dir ownership
Requires: cmake
%description -n python%{python3_pkgversion}-%{name}-devel
%description devel
%{base_description}
This package contains the development headers for pybind11.
%package -n python%{python3_pkgversion}-%{name}
%if %{python2_enabled}
%package -n python2-%{name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-pybind11}
%{?python_provide:%python_provide python2-pybind11}
Requires: %{name}-devel%{?_isa} = 1:%{version}-%{release}
Requires: python%{python3_pkgversion}-%{name}-devel%{?_isa} = %{version}-%{release}
Requires: python%{python3_pkgversion}-setuptools
%description -n python2-%{name}
%{base_description}
%description -n python%{python3_pkgversion}-%{name}
This package contains the Python 2 files.
%endif
%if %{python3_enabled}
%package -n python3-%{name}
Summary: %{summary}
%{?python_provide:%python_provide python3-pybind11}
Requires: %{name}-devel%{?_isa} = 1:%{version}-%{release}
%if !%{python2_enabled}
# Take care of upgrade path
Obsoletes: python2-%{name} < %{version}-%{release}
%endif
%description -n python3-%{name}
%{base_description}
This package contains the Python 3 files.
%endif
%prep
%setup -q
@ -89,51 +120,110 @@ This package contains the Python 3 files.
%build
pys=""
%if %{python2_enabled}
pys="$pys python2"
%endif
%if %{python3_enabled}
pys="$pys python3"
%endif
for py in $pys; do
mkdir $py
cd $py
# When -DCMAKE_BUILD_TYPE is set to Release, the tests in %%check segfault.
# When -DCMAKE_BUILD_TYPE is set to Release, the tests in %%check might segfault.
# However, we do not ship any binaries, and therefore Debug
# build type does not affect the results.
%cmake .. -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{__python3} -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF}
%make_build
cd ..
# https://bugzilla.redhat.com/show_bug.cgi?id=1921199
%cmake -B $py -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{_bindir}/$py -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF}
%make_build -C $py
done
%if %{python2_enabled}
%py2_build
%endif
%if %{python3_enabled}
%py3_build
%endif
%if %{with tests}
%check
%if %{python2_enabled}
make -C python2 check %{?_smp_mflags}
%endif
%if %{python3_enabled}
make -C python3 check %{?_smp_mflags}
%endif
%endif
%install
# Doesn't matter if both installs run
%if %{python2_enabled}
%make_install -C python2
%endif
%if %{python3_enabled}
%make_install -C python3
%endif
# Force install to arch-ful directories instead.
%if %{python2_enabled}
PYBIND11_USE_CMAKE=true %py2_install "--install-purelib" "%{python2_sitearch}"
%endif
%if %{python3_enabled}
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
%endif
%files -n python%{python3_pkgversion}-%{name}-devel
%files devel
%license LICENSE
%doc README.rst
%{_includedir}/pybind11/
%{_datadir}/cmake/pybind11/
%{_bindir}/pybind11-config
%{_datadir}/pkgconfig/%{name}.pc
%files -n python%{python3_pkgversion}-%{name}
%if %{python2_enabled}
%files -n python2-%{name}
%{python2_sitearch}/%{name}/
%{python2_sitearch}/%{name}-%{version}-py?.?.egg-info
%endif
%if %{python3_enabled}
%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%endif
%changelog
* Fri Oct 01 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.7.1-1
- Update to 2.7.1
- Resolves: rhbz#2000212
* Thu Oct 31 2024 Pavel Simovec <psimovec@redhat.com> - 2.10.4-2
- rebuilt
- Resolves: RHEL-62014
* Mon Jan 18 2021 Tomas Orsava <torsava@redhat.com> - 2.6.1-2
- Convert from Fedora to the python39 module in RHEL8
- Resolves: rhbz#1877430
* 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
- Manually add Provides and Obsoletes for python39-pybind11-devel
- Related: rhbz#1990421
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.2-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.2-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.2-1
- Update to 2.6.2.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Nov 12 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.1-1
- Update to 2.6.1.

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (pybind11-2.10.4.tar.gz) = 7970defbb6d057a44468ed707c80bfa6ef8c9578528fbc084b03aeea20a52dbd681581f82d55ff90af11ee89693379bd79e2ab6603239ba05b0aa8da29dd93c7