Blame SPECS/pybind11.spec

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