2017-02-27 19:56:28 +00:00
|
|
|
# While the headers are architecture independent, the package must be
|
|
|
|
# built separately on all architectures so that the tests are run
|
|
|
|
# properly. See also
|
|
|
|
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
Name: pybind11
|
2018-02-14 18:41:37 +00:00
|
|
|
Version: 2.2.2
|
2018-06-19 08:50:14 +00:00
|
|
|
Release: 4%{?dist}
|
2017-02-27 19:56:28 +00:00
|
|
|
Summary: Seamless operability between C++11 and Python
|
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/pybind/pybind11
|
2017-12-14 07:30:26 +00:00
|
|
|
Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{version}.tar.gz
|
2018-02-17 15:47:57 +00:00
|
|
|
# Little-endian fix
|
2018-04-16 09:55:48 +00:00
|
|
|
Patch0: 1287.patch
|
2017-02-27 19:56:28 +00:00
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
# Don't use pip to get path to headers
|
|
|
|
Patch1: pybind11-2.2.2-nopip.patch
|
|
|
|
|
|
|
|
# Needed to build the python libraries
|
2017-02-27 19:56:28 +00:00
|
|
|
BuildRequires: python2-devel
|
2018-04-16 09:55:48 +00:00
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
|
|
|
# These are only needed for the checks
|
2017-02-27 19:56:28 +00:00
|
|
|
BuildRequires: python2-pytest
|
|
|
|
BuildRequires: python2-numpy
|
|
|
|
BuildRequires: python2-scipy
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-numpy
|
|
|
|
BuildRequires: python3-scipy
|
|
|
|
BuildRequires: eigen3-devel
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
%global base_description \
|
|
|
|
pybind11 is a lightweight header-only library that exposes C++ types \
|
|
|
|
in Python and vice versa, mainly to create Python bindings of existing \
|
2017-02-27 19:56:28 +00:00
|
|
|
C++ code.
|
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
%description
|
|
|
|
%{base_description}
|
|
|
|
|
2017-02-27 19:56:28 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development headers for pybind11
|
|
|
|
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
|
|
|
Provides: %{name}-static = %{version}-%{release}
|
|
|
|
# For dir ownership
|
|
|
|
Requires: cmake
|
|
|
|
|
|
|
|
%description devel
|
2018-04-16 09:55:48 +00:00
|
|
|
%{base_description}
|
2017-02-27 19:56:28 +00:00
|
|
|
|
|
|
|
This package contains the development headers for pybind11.
|
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
%package -n python2-%{name}
|
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python2-%{name}
|
|
|
|
%{base_description}
|
|
|
|
|
|
|
|
This package contains the Python 2 files.
|
|
|
|
|
|
|
|
%package -n python3-%{name}
|
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
%{base_description}
|
|
|
|
|
|
|
|
This package contains the Python 3 files.
|
|
|
|
|
|
|
|
|
2017-02-27 19:56:28 +00:00
|
|
|
%prep
|
2018-04-16 09:55:48 +00:00
|
|
|
%setup -q
|
|
|
|
%patch0 -p1 -b .endian
|
|
|
|
%patch1 -p1 -b .nopip
|
2017-02-27 19:56:28 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
for py in python2 python3; do
|
2018-04-16 09:55:48 +00:00
|
|
|
mkdir $py
|
|
|
|
cd $py
|
|
|
|
%cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%{_bindir}/$py
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
cd ..
|
2017-02-27 19:56:28 +00:00
|
|
|
done
|
2018-04-16 09:55:48 +00:00
|
|
|
%py2_build
|
|
|
|
%py3_build
|
2017-02-27 19:56:28 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
make -C python2 check %{?_smp_mflags}
|
|
|
|
make -C python3 check %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
|
|
|
%make_install -C python2
|
2018-04-16 09:55:48 +00:00
|
|
|
# Force install to arch-ful directories instead.
|
|
|
|
PYBIND11_USE_CMAKE=true %py2_install "--install-purelib" "%{python2_sitearch}"
|
|
|
|
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
2017-02-27 19:56:28 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{_includedir}/pybind11/
|
|
|
|
%{_datadir}/cmake/pybind11/
|
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
%files -n python2-%{name}
|
|
|
|
%{python2_sitearch}/%{name}/
|
|
|
|
%{python2_sitearch}/%{name}-%{version}-py?.?.egg-info
|
|
|
|
|
|
|
|
%files -n python3-%{name}
|
|
|
|
%{python3_sitearch}/%{name}/
|
|
|
|
%{python3_sitearch}/%{name}-%{version}-py?.?.egg-info
|
|
|
|
|
2017-02-27 19:56:28 +00:00
|
|
|
|
|
|
|
%changelog
|
2018-06-19 08:50:14 +00:00
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.2.2-4
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
2018-04-16 09:55:48 +00:00
|
|
|
* Mon Apr 16 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-3
|
|
|
|
- Add Python subpackages based on Elliott Sales de Andrade's patch.
|
|
|
|
|
2018-02-17 15:47:57 +00:00
|
|
|
* Sat Feb 17 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-2
|
|
|
|
- Fix FTBS by patch from upstream.
|
|
|
|
|
2018-02-14 18:41:37 +00:00
|
|
|
* Wed Feb 14 2018 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.2.2-1
|
|
|
|
- Update to 2.2.2.
|
|
|
|
|
2018-02-09 06:04:40 +00:00
|
|
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
2017-12-14 07:21:10 +00:00
|
|
|
* Thu Dec 14 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-1
|
|
|
|
- Update to latest version
|
2017-12-14 07:30:26 +00:00
|
|
|
- Update Source URL to include project name.
|
2017-12-14 07:21:10 +00:00
|
|
|
|
2017-08-03 06:30:26 +00:00
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
|
2017-07-27 09:14:30 +00:00
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-02-27 19:56:28 +00:00
|
|
|
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-5
|
|
|
|
- Full compliance with header only libraries guidelines.
|
|
|
|
|
|
|
|
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-4
|
|
|
|
- As advised by upstream, disable dtypes test for now.
|
|
|
|
- Include patch for tests on bigendian systems.
|
|
|
|
|
|
|
|
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-3
|
|
|
|
- Make the package arched so that tests can be run on all architectures.
|
|
|
|
- Run tests both against python2 and python3.
|
|
|
|
|
|
|
|
* Wed Feb 22 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-2
|
|
|
|
- Switch to python3 for tests.
|
|
|
|
|
|
|
|
* Sun Feb 05 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-1
|
|
|
|
- First release.
|