Update to 2.2.4, remove python2 packages on Fedora >= 30.
This commit is contained in:
parent
b9a3bbda9e
commit
2f09cf5595
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
/pybind11-2.2.1.tar.gz
|
/pybind11-2.2.1.tar.gz
|
||||||
/pybind11-2.2.2.tar.gz
|
/pybind11-2.2.2.tar.gz
|
||||||
/pybind11-2.2.3.tar.gz
|
/pybind11-2.2.3.tar.gz
|
||||||
|
/pybind11-2.2.4.tar.gz
|
||||||
|
@ -4,9 +4,17 @@
|
|||||||
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%if 0%{?fedora} >= 30
|
||||||
|
%global python2_enabled 0
|
||||||
|
%else
|
||||||
|
%global python2_enabled 1
|
||||||
|
%endif
|
||||||
|
%global python3_enabled 1
|
||||||
|
|
||||||
|
|
||||||
Name: pybind11
|
Name: pybind11
|
||||||
Version: 2.2.3
|
Version: 2.2.4
|
||||||
Release: 3%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Seamless operability between C++11 and Python
|
Summary: Seamless operability between C++11 and Python
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/pybind/pybind11
|
URL: https://github.com/pybind/pybind11
|
||||||
@ -15,19 +23,26 @@ Source0: https://github.com/pybind/pybind11/archive/v%{version}/%{name}-%{versio
|
|||||||
# Don't use pip to get path to headers
|
# Don't use pip to get path to headers
|
||||||
Patch1: pybind11-2.2.3-nopip.patch
|
Patch1: pybind11-2.2.3-nopip.patch
|
||||||
|
|
||||||
|
%if %{python2_enabled}
|
||||||
# Needed to build the python libraries
|
# Needed to build the python libraries
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
|
|
||||||
# These are only needed for the checks
|
# These are only needed for the checks
|
||||||
BuildRequires: python2-pytest
|
BuildRequires: python2-pytest
|
||||||
BuildRequires: python2-numpy
|
BuildRequires: python2-numpy
|
||||||
BuildRequires: python2-scipy
|
BuildRequires: python2-scipy
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{python3_enabled}
|
||||||
|
# Needed to build the python libraries
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
# These are only needed for the checks
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-numpy
|
BuildRequires: python3-numpy
|
||||||
BuildRequires: python3-scipy
|
BuildRequires: python3-scipy
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: eigen3-devel
|
BuildRequires: eigen3-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -52,6 +67,7 @@ Requires: cmake
|
|||||||
|
|
||||||
This package contains the development headers for pybind11.
|
This package contains the development headers for pybind11.
|
||||||
|
|
||||||
|
%if %{python2_enabled}
|
||||||
%package -n python2-%{name}
|
%package -n python2-%{name}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python2-%{srcname}}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
@ -61,43 +77,74 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
|||||||
%{base_description}
|
%{base_description}
|
||||||
|
|
||||||
This package contains the Python 2 files.
|
This package contains the Python 2 files.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{python3_enabled}
|
||||||
%package -n python3-%{name}
|
%package -n python3-%{name}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python3-%{srcname}}
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
|
||||||
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%if !%{python2_enabled}
|
||||||
|
# Take care of upgrade path
|
||||||
|
Obsoletes: python2-%{name} < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description -n python3-%{name}
|
%description -n python3-%{name}
|
||||||
%{base_description}
|
%{base_description}
|
||||||
|
|
||||||
This package contains the Python 3 files.
|
This package contains the Python 3 files.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .nopip
|
%patch1 -p1 -b .nopip
|
||||||
|
|
||||||
%build
|
%build
|
||||||
for py in python2 python3; do
|
pys=""
|
||||||
|
%if %{python2_enabled}
|
||||||
|
pys="$py python2"
|
||||||
|
%endif
|
||||||
|
%if %{python3_enabled}
|
||||||
|
pys="$py python3"
|
||||||
|
%endif
|
||||||
|
for py in $pys; do
|
||||||
mkdir $py
|
mkdir $py
|
||||||
cd $py
|
cd $py
|
||||||
%cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%{_bindir}/$py
|
%cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%{_bindir}/$py
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%if %{python2_enabled}
|
||||||
%py2_build
|
%py2_build
|
||||||
|
%endif
|
||||||
|
%if %{python3_enabled}
|
||||||
%py3_build
|
%py3_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{python2_enabled}
|
||||||
make -C python2 check %{?_smp_mflags}
|
make -C python2 check %{?_smp_mflags}
|
||||||
|
%endif
|
||||||
|
%if %{python3_enabled}
|
||||||
make -C python3 check %{?_smp_mflags}
|
make -C python3 check %{?_smp_mflags}
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{python2_enabled}
|
||||||
%make_install -C python2
|
%make_install -C python2
|
||||||
|
%elif %{python3_enabled}
|
||||||
|
%make_install -C python3
|
||||||
|
%endif
|
||||||
# Force install to arch-ful directories instead.
|
# Force install to arch-ful directories instead.
|
||||||
|
%if %{python2_enabled}
|
||||||
PYBIND11_USE_CMAKE=true %py2_install "--install-purelib" "%{python2_sitearch}"
|
PYBIND11_USE_CMAKE=true %py2_install "--install-purelib" "%{python2_sitearch}"
|
||||||
|
%endif
|
||||||
|
%if %{python3_enabled}
|
||||||
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -105,16 +152,23 @@ PYBIND11_USE_CMAKE=true %py3_install "--install-purelib" "%{python3_sitearch}"
|
|||||||
%{_includedir}/pybind11/
|
%{_includedir}/pybind11/
|
||||||
%{_datadir}/cmake/pybind11/
|
%{_datadir}/cmake/pybind11/
|
||||||
|
|
||||||
|
%if %{python2_enabled}
|
||||||
%files -n python2-%{name}
|
%files -n python2-%{name}
|
||||||
%{python2_sitearch}/%{name}/
|
%{python2_sitearch}/%{name}/
|
||||||
%{python2_sitearch}/%{name}-%{version}-py?.?.egg-info
|
%{python2_sitearch}/%{name}-%{version}-py?.?.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{python3_enabled}
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%{python3_sitearch}/%{name}/
|
%{python3_sitearch}/%{name}/
|
||||||
%{python3_sitearch}/%{name}-%{version}-py?.?.egg-info
|
%{python3_sitearch}/%{name}-%{version}-py?.?.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 18 2018 Susi Lehtola - 2.2.4-1
|
||||||
|
- Remove python2 packages for Fedora >= 30.
|
||||||
|
- Update to 2.2.4.
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (pybind11-2.2.3.tar.gz) = 3a43b43f44ae4a6453fe3b875384acc868310177216938cb564536e6b73c56002743137e5f61cf4ecbd6c56e3b39476ebf06aea33d460581fc7d8ba7b2a22a67
|
SHA512 (pybind11-2.2.4.tar.gz) = 6bddf5c885ff92a3e373bcedc6574dfefe8be9ebb6176c6c96d475457466c76bfb982c6df4066cb0fbead4b867f87dbc4fbc1605c80852635016f614330ce041
|
||||||
|
Loading…
Reference in New Issue
Block a user