|
|
cf8fd1 |
# While the headers are architecture independent, the package must be
|
|
|
cf8fd1 |
# built separately on all architectures so that the tests are run
|
|
|
cf8fd1 |
# properly. See also
|
|
|
cf8fd1 |
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
|
|
cf8fd1 |
%global debug_package %{nil}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
# Whether to run the tests, enabled by default
|
|
|
cf8fd1 |
%bcond_without tests
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 9
|
|
|
cf8fd1 |
%global python2_enabled 0
|
|
|
cf8fd1 |
%else
|
|
|
cf8fd1 |
%global python2_enabled 1
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%global python3_enabled 1
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
Name: pybind11
|
|
|
cf8fd1 |
Version: 2.6.2
|
|
|
36d6b7 |
Release: 4%{?dist}
|
|
|
cf8fd1 |
Summary: Seamless operability between C++11 and Python
|
|
|
cf8fd1 |
License: BSD
|
|
|
cf8fd1 |
URL: https://github.com/pybind/pybind11
|
|
|
cf8fd1 |
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
# Patch out header path
|
|
|
cf8fd1 |
Patch1: pybind11-2.6.1-hpath.patch
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
BuildRequires: make
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
# Needed to build the python libraries
|
|
|
cf8fd1 |
BuildRequires: python2-devel
|
|
|
cf8fd1 |
BuildRequires: python2-setuptools
|
|
|
cf8fd1 |
# These are only needed for the checks
|
|
|
cf8fd1 |
%if %{with tests}
|
|
|
cf8fd1 |
BuildRequires: python2-pytest
|
|
|
cf8fd1 |
BuildRequires: python2-numpy
|
|
|
cf8fd1 |
BuildRequires: python2-scipy
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
# Needed to build the python libraries
|
|
|
cf8fd1 |
BuildRequires: python3-devel
|
|
|
cf8fd1 |
BuildRequires: python3-setuptools
|
|
|
cf8fd1 |
# These are only needed for the checks
|
|
|
cf8fd1 |
%if %{with tests}
|
|
|
cf8fd1 |
BuildRequires: python3-pytest
|
|
|
cf8fd1 |
BuildRequires: python3-numpy
|
|
|
cf8fd1 |
BuildRequires: python3-scipy
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
BuildRequires: eigen3-devel
|
|
|
cf8fd1 |
BuildRequires: gcc-c++
|
|
|
cf8fd1 |
BuildRequires: cmake
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%global base_description \
|
|
|
cf8fd1 |
pybind11 is a lightweight header-only library that exposes C++ types \
|
|
|
cf8fd1 |
in Python and vice versa, mainly to create Python bindings of existing \
|
|
|
cf8fd1 |
C++ code.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%description
|
|
|
cf8fd1 |
%{base_description}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%package devel
|
|
|
cf8fd1 |
Summary: Development headers for pybind11
|
|
|
cf8fd1 |
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
|
|
cf8fd1 |
Provides: %{name}-static = %{version}-%{release}
|
|
|
36d6b7 |
Obsoletes: python39-%{name}-devel < %{version}-%{release}
|
|
|
cf8fd1 |
# For dir ownership
|
|
|
cf8fd1 |
Requires: cmake
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%description devel
|
|
|
cf8fd1 |
%{base_description}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
This package contains the development headers for pybind11.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
%package -n python2-%{name}
|
|
|
cf8fd1 |
Summary: %{summary}
|
|
|
cf8fd1 |
%{?python_provide:%python_provide python2-pybind11}
|
|
|
cf8fd1 |
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%description -n python2-%{name}
|
|
|
cf8fd1 |
%{base_description}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
This package contains the Python 2 files.
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
%package -n python3-%{name}
|
|
|
cf8fd1 |
Summary: %{summary}
|
|
|
cf8fd1 |
%{?python_provide:%python_provide python3-pybind11}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if !%{python2_enabled}
|
|
|
cf8fd1 |
# Take care of upgrade path
|
|
|
cf8fd1 |
Obsoletes: python2-%{name} < %{version}-%{release}
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%description -n python3-%{name}
|
|
|
cf8fd1 |
%{base_description}
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
This package contains the Python 3 files.
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%prep
|
|
|
cf8fd1 |
%setup -q
|
|
|
cf8fd1 |
%patch1 -p1 -b .hpath
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%build
|
|
|
cf8fd1 |
pys=""
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
pys="$pys python2"
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
pys="$pys python3"
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
for py in $pys; do
|
|
|
cf8fd1 |
mkdir $py
|
|
|
cf8fd1 |
# When -DCMAKE_BUILD_TYPE is set to Release, the tests in %%check might segfault.
|
|
|
cf8fd1 |
# However, we do not ship any binaries, and therefore Debug
|
|
|
cf8fd1 |
# build type does not affect the results.
|
|
|
cf8fd1 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1921199
|
|
|
cf8fd1 |
%cmake -B $py -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{_bindir}/$py -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF}
|
|
|
cf8fd1 |
%make_build -C $py
|
|
|
cf8fd1 |
done
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
%py2_build
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
%py3_build
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{with tests}
|
|
|
cf8fd1 |
%check
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
make -C python2 check %{?_smp_mflags}
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
make -C python3 check %{?_smp_mflags}
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%install
|
|
|
cf8fd1 |
# Doesn't matter if both installs run
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
%make_install -C python2
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
%make_install -C python3
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
# Force install to arch-ful directories instead.
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
PYBIND11_USE_CMAKE=true %py2_install "--install-purelib" "%{python2_sitearch}"
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%files devel
|
|
|
cf8fd1 |
%license LICENSE
|
|
|
cf8fd1 |
%doc README.rst
|
|
|
cf8fd1 |
%{_includedir}/pybind11/
|
|
|
cf8fd1 |
%{_datadir}/cmake/pybind11/
|
|
|
cf8fd1 |
%{_bindir}/pybind11-config
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python2_enabled}
|
|
|
cf8fd1 |
%files -n python2-%{name}
|
|
|
cf8fd1 |
%{python2_sitearch}/%{name}/
|
|
|
cf8fd1 |
%{python2_sitearch}/%{name}-%{version}-py?.?.egg-info
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%if %{python3_enabled}
|
|
|
cf8fd1 |
%files -n python3-%{name}
|
|
|
cf8fd1 |
%{python3_sitearch}/%{name}/
|
|
|
cf8fd1 |
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
|
|
|
cf8fd1 |
%endif
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
%changelog
|
|
|
36d6b7 |
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 2.6.2-4
|
|
|
36d6b7 |
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
36d6b7 |
for smoother upgrade from RHEL8
|
|
|
36d6b7 |
- Manually add Provides and Obsoletes for python39-pybind11-devel
|
|
|
36d6b7 |
- Related: rhbz#1990421
|
|
|
36d6b7 |
|
|
|
cf8fd1 |
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.2-3
|
|
|
cf8fd1 |
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
cf8fd1 |
Related: rhbz#1991688
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.6.2-2
|
|
|
cf8fd1 |
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Jan 27 2021 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.2-1
|
|
|
cf8fd1 |
- Update to 2.6.2.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.1-2
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Nov 12 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.1-1
|
|
|
cf8fd1 |
- Update to 2.6.1.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Aug 12 2020 Merlin Mathesius <mmathesi@redhat.com> - 2.5.0-5
|
|
|
cf8fd1 |
- Drop Python 2 support for ELN and RHEL9+
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Aug 05 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.5.0-6
|
|
|
cf8fd1 |
- Adapt to new CMake macros.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-5
|
|
|
cf8fd1 |
- Second attempt - Rebuilt for
|
|
|
cf8fd1 |
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-4
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
|
|
|
cf8fd1 |
- Rebuilt for Python 3.9
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-2
|
|
|
cf8fd1 |
- Bootstrap for Python 3.9
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Apr 01 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.5.0-1
|
|
|
cf8fd1 |
- Update to 2.5.0.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue Oct 15 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.3-1
|
|
|
cf8fd1 |
- Update to 2.4.3.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue Oct 08 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.2-2
|
|
|
cf8fd1 |
- Fix Python 3.8 incompatibility.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sat Sep 28 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.2-1
|
|
|
cf8fd1 |
- Update to 2.4.2.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Sep 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.1-1
|
|
|
cf8fd1 |
- Update to 2.4.1.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Sep 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.0-1
|
|
|
cf8fd1 |
- Update to 2.4.0.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-3
|
|
|
cf8fd1 |
- Rebuilt for Python 3.8
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Jul 10 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.0-1
|
|
|
cf8fd1 |
- Update to 2.3.0.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri May 03 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.4-3
|
|
|
cf8fd1 |
- Fix incompatibility with pytest 4.0.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-2
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue Sep 18 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.4-1
|
|
|
cf8fd1 |
- Remove python2 packages for Fedora >= 30.
|
|
|
cf8fd1 |
- Update to 2.2.4.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sat Jun 23 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.3-2
|
|
|
cf8fd1 |
- Rebuilt for Python 3.7
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Jun 22 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.3-1
|
|
|
cf8fd1 |
- Update to 2.2.3.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.2-4
|
|
|
cf8fd1 |
- Rebuilt for Python 3.7
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Mon Apr 16 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-3
|
|
|
cf8fd1 |
- Add Python subpackages based on Elliott Sales de Andrade's patch.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sat Feb 17 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-2
|
|
|
cf8fd1 |
- Fix FTBS by patch from upstream.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Feb 14 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-1
|
|
|
cf8fd1 |
- Update to 2.2.2.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Dec 14 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-1
|
|
|
cf8fd1 |
- Update to latest version
|
|
|
cf8fd1 |
- Update Source URL to include project name.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
|
|
|
cf8fd1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-5
|
|
|
cf8fd1 |
- Full compliance with header only libraries guidelines.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-4
|
|
|
cf8fd1 |
- As advised by upstream, disable dtypes test for now.
|
|
|
cf8fd1 |
- Include patch for tests on bigendian systems.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-3
|
|
|
cf8fd1 |
- Make the package arched so that tests can be run on all architectures.
|
|
|
cf8fd1 |
- Run tests both against python2 and python3.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Wed Feb 22 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-2
|
|
|
cf8fd1 |
- Switch to python3 for tests.
|
|
|
cf8fd1 |
|
|
|
cf8fd1 |
* Sun Feb 05 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-1
|
|
|
cf8fd1 |
- First release.
|