Blame SPECS/pybind11.spec

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