Blame SPECS/pybind11.spec

ff22a3
# While the headers are architecture independent, the package must be
ff22a3
# built separately on all architectures so that the tests are run
ff22a3
# properly. See also
ff22a3
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
ff22a3
%global debug_package %{nil}
ff22a3
ff22a3
# Whether to run the tests, enabled by default
ff22a3
%bcond_without tests
ff22a3
ff22a3
Name:    pybind11
5c8eb2
Version: 2.7.1
5c8eb2
Release: 1%{?dist}
ff22a3
Summary: Seamless operability between C++11 and Python
ff22a3
License: BSD
ff22a3
URL:     https://github.com/pybind/pybind11
ff22a3
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
ff22a3
ff22a3
# Exclude i686 arch. Due to a modularity issue it's being added to the
ff22a3
# x86_64 compose of CRB, but we don't want to ship it at all.
ff22a3
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ff22a3
ExcludeArch: i686
ff22a3
ff22a3
# Patch out header path
ff22a3
Patch1:  pybind11-2.6.1-hpath.patch
ff22a3
ff22a3
BuildRequires: make
ff22a3
ff22a3
# Needed to build the python libraries
ff22a3
BuildRequires: python%{python3_pkgversion}-devel
ff22a3
BuildRequires: python%{python3_pkgversion}-rpm-macros
ff22a3
BuildRequires: python%{python3_pkgversion}-setuptools
ff22a3
# These are only needed for the checks
ff22a3
%if %{with tests}
ff22a3
BuildRequires: python%{python3_pkgversion}-pytest
ff22a3
BuildRequires: python%{python3_pkgversion}-numpy
ff22a3
BuildRequires: python%{python3_pkgversion}-scipy
ff22a3
%endif
ff22a3
ff22a3
BuildRequires: eigen3-devel
ff22a3
BuildRequires: gcc-c++
ff22a3
BuildRequires: cmake
ff22a3
ff22a3
%global base_description \
ff22a3
pybind11 is a lightweight header-only library that exposes C++ types \
ff22a3
in Python and vice versa, mainly to create Python bindings of existing \
ff22a3
C++ code.
ff22a3
ff22a3
%description
ff22a3
%{base_description}
ff22a3
ff22a3
ff22a3
%package -n python%{python3_pkgversion}-%{name}-devel
ff22a3
Summary:  Development headers for pybind11
ff22a3
ff22a3
# This package does not have namespaced file locations, so if we build the
ff22a3
# pybind11-devel subpackage in any other module as well, the files from these
ff22a3
# packages will conflict. The package name is namespaced so that customers can
ff22a3
# decide which to install, but the packages will conflict with each other.
ff22a3
Provides:   %{name}-devel = %{version}-%{release}
ff22a3
Conflicts:  %{name}-devel < %{version}-%{release}
ff22a3
ff22a3
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
ff22a3
Provides: %{name}-static = %{version}-%{release}
ff22a3
Provides: python%{python3_pkgversion}-%{name}-static = %{version}-%{release}
ff22a3
# For dir ownership
ff22a3
Requires: cmake
ff22a3
ff22a3
%description -n python%{python3_pkgversion}-%{name}-devel
ff22a3
%{base_description}
ff22a3
ff22a3
This package contains the development headers for pybind11.
ff22a3
ff22a3
%package -n     python%{python3_pkgversion}-%{name}
ff22a3
Summary:        %{summary}
ff22a3
%{?python_provide:%python_provide python%{python3_pkgversion}-pybind11}
ff22a3
ff22a3
Requires: python%{python3_pkgversion}-%{name}-devel%{?_isa} = %{version}-%{release}
ff22a3
Requires: python%{python3_pkgversion}-setuptools
ff22a3
ff22a3
%description -n python%{python3_pkgversion}-%{name}
ff22a3
%{base_description}
ff22a3
ff22a3
This package contains the Python 3 files.
ff22a3
ff22a3
ff22a3
%prep
ff22a3
%setup -q
ff22a3
%patch1 -p1 -b .hpath
ff22a3
ff22a3
%build
ff22a3
pys=""
ff22a3
pys="$pys python3"
ff22a3
for py in $pys; do
ff22a3
    mkdir $py
ff22a3
    cd $py
ff22a3
    # When -DCMAKE_BUILD_TYPE is set to Release, the tests in %%check segfault.
ff22a3
    # However, we do not ship any binaries, and therefore Debug
ff22a3
    # build type does not affect the results.
ff22a3
    %cmake .. -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{__python3} -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF}
ff22a3
    %make_build
ff22a3
    cd ..
ff22a3
done
ff22a3
ff22a3
%py3_build
ff22a3
ff22a3
%if %{with tests}
ff22a3
%check
ff22a3
make -C python3 check %{?_smp_mflags}
ff22a3
%endif
ff22a3
ff22a3
%install
ff22a3
# Doesn't matter if both installs run
ff22a3
%make_install -C python3
ff22a3
# Force install to arch-ful directories instead.
ff22a3
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
ff22a3
ff22a3
%files -n python%{python3_pkgversion}-%{name}-devel
ff22a3
%license LICENSE
ff22a3
%doc README.rst
ff22a3
%{_includedir}/pybind11/
ff22a3
%{_datadir}/cmake/pybind11/
ff22a3
%{_bindir}/pybind11-config
ff22a3
ff22a3
%files -n python%{python3_pkgversion}-%{name}
ff22a3
%{python3_sitearch}/%{name}/
ff22a3
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
ff22a3
ff22a3
ff22a3
%changelog
5c8eb2
* Fri Oct 01 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.7.1-1
5c8eb2
- Update to 2.7.1
5c8eb2
- Resolves: rhbz#2000212
5c8eb2
ff22a3
* Mon Jan 18 2021 Tomas Orsava <torsava@redhat.com> - 2.6.1-2
ff22a3
- Convert from Fedora to the python39 module in RHEL8
ff22a3
- Resolves: rhbz#1877430
ff22a3
ff22a3
* Thu Nov 12 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.6.1-1
ff22a3
- Update to 2.6.1.
ff22a3
ff22a3
* Wed Aug 12 2020 Merlin Mathesius <mmathesi@redhat.com> - 2.5.0-5
ff22a3
- Drop Python 2 support for ELN and RHEL9+
ff22a3
ff22a3
* Wed Aug 05 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.5.0-6
ff22a3
- Adapt to new CMake macros.
ff22a3
ff22a3
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-5
ff22a3
- Second attempt - Rebuilt for
ff22a3
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ff22a3
ff22a3
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-4
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ff22a3
ff22a3
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-3
ff22a3
- Rebuilt for Python 3.9
ff22a3
ff22a3
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2.5.0-2
ff22a3
- Bootstrap for Python 3.9
ff22a3
ff22a3
* Wed Apr 01 2020 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.5.0-1
ff22a3
- Update to 2.5.0.
ff22a3
ff22a3
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ff22a3
ff22a3
* Tue Oct 15 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.3-1
ff22a3
- Update to 2.4.3.
ff22a3
ff22a3
* Tue Oct 08 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.2-2
ff22a3
- Fix Python 3.8 incompatibility.
ff22a3
ff22a3
* Sat Sep 28 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.2-1
ff22a3
- Update to 2.4.2.
ff22a3
ff22a3
* Fri Sep 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.1-1
ff22a3
- Update to 2.4.1.
ff22a3
ff22a3
* Fri Sep 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.0-1
ff22a3
- Update to 2.4.0.
ff22a3
ff22a3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.3.0-3
ff22a3
- Rebuilt for Python 3.8
ff22a3
ff22a3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.0-2
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ff22a3
ff22a3
* Wed Jul 10 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.3.0-1
ff22a3
- Update to 2.3.0.
ff22a3
ff22a3
* Fri May 03 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.4-3
ff22a3
- Fix incompatibility with pytest 4.0.
ff22a3
ff22a3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-2
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
ff22a3
ff22a3
* Tue Sep 18 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.4-1
ff22a3
- Remove python2 packages for Fedora >= 30.
ff22a3
- Update to 2.2.4.
ff22a3
ff22a3
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ff22a3
ff22a3
* Sat Jun 23 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.3-2
ff22a3
- Rebuilt for Python 3.7
ff22a3
ff22a3
* Fri Jun 22 2018 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.2.3-1
ff22a3
- Update to 2.2.3.
ff22a3
ff22a3
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.2-4
ff22a3
- Rebuilt for Python 3.7
ff22a3
ff22a3
* Mon Apr 16 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-3
ff22a3
- Add Python subpackages based on Elliott Sales de Andrade's patch.
ff22a3
ff22a3
* Sat Feb 17 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-2
ff22a3
- Fix FTBS by patch from upstream.
ff22a3
ff22a3
* Wed Feb 14 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-1
ff22a3
- Update to 2.2.2.
ff22a3
ff22a3
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ff22a3
ff22a3
* Thu Dec 14 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-1
ff22a3
- Update to latest version
ff22a3
- Update Source URL to include project name.
ff22a3
ff22a3
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
ff22a3
ff22a3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
ff22a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
ff22a3
ff22a3
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-5
ff22a3
- Full compliance with header only libraries guidelines.
ff22a3
ff22a3
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-4
ff22a3
- As advised by upstream, disable dtypes test for now.
ff22a3
- Include patch for tests on bigendian systems.
ff22a3
ff22a3
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-3
ff22a3
- Make the package arched so that tests can be run on all architectures.
ff22a3
- Run tests both against python2 and python3.
ff22a3
ff22a3
* Wed Feb 22 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-2
ff22a3
- Switch to python3 for tests.
ff22a3
ff22a3
* Sun Feb 05 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-1
ff22a3
- First release.