1d3ad0b
# While the headers are architecture independent, the package must be
1d3ad0b
# built separately on all architectures so that the tests are run
1d3ad0b
# properly. See also
1d3ad0b
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
1d3ad0b
%global debug_package %{nil}
1d3ad0b
1d3ad0b
Name:    pybind11		
1d3ad0b
Version: 2.0.1
8174232
Release: 7%{?dist}
1d3ad0b
Summary: Seamless operability between C++11 and Python
1d3ad0b
License: BSD	
1d3ad0b
URL:	 https://github.com/pybind/pybind11	
1d3ad0b
Source0: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz
1d3ad0b
1d3ad0b
# Disable numpy dtypes test as guided in https://github.com/pybind/pybind11/issues/694
1d3ad0b
Patch0:  pybind11-2.0.1-tests.patch
1d3ad0b
# Fix tests that are broken on bigendian systems, adapted from https://github.com/pybind/pybind11/pull/699
1d3ad0b
Patch1:  pybind11-2.0.1-byteorder.patch
1d3ad0b
1d3ad0b
# These are only needed for the checks
1d3ad0b
BuildRequires: python2-devel
1d3ad0b
BuildRequires: python2-pytest
1d3ad0b
BuildRequires: python2-numpy
1d3ad0b
BuildRequires: python2-scipy
1d3ad0b
BuildRequires: python3-devel
1d3ad0b
BuildRequires: python3-pytest
1d3ad0b
BuildRequires: python3-numpy
1d3ad0b
BuildRequires: python3-scipy
1d3ad0b
BuildRequires: eigen3-devel
1d3ad0b
BuildRequires: gcc-c++
1d3ad0b
BuildRequires: cmake
1d3ad0b
1d3ad0b
%description
1d3ad0b
pybind11 is a lightweight header-only library that exposes C++ types
1d3ad0b
in Python and vice versa, mainly to create Python bindings of existing
1d3ad0b
C++ code.
1d3ad0b
1d3ad0b
%package devel
1d3ad0b
Summary:  Development headers for pybind11
1d3ad0b
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Header_Only_Libraries
1d3ad0b
Provides: %{name}-static = %{version}-%{release}
1d3ad0b
# For dir ownership
1d3ad0b
Requires: cmake
1d3ad0b
1d3ad0b
%description devel
1d3ad0b
pybind11 is a lightweight header-only library that exposes C++ types
1d3ad0b
in Python and vice versa, mainly to create Python bindings of existing
1d3ad0b
C++ code.
1d3ad0b
1d3ad0b
This package contains the development headers for pybind11.
1d3ad0b
1d3ad0b
%prep
1d3ad0b
%setup -q
1d3ad0b
%patch0 -p1 -b .tests
1d3ad0b
%patch1 -p1 -b .order
1d3ad0b
1d3ad0b
%build
1d3ad0b
for py in python2 python3; do
1d3ad0b
mkdir $py
1d3ad0b
cd $py
1d3ad0b
%cmake .. -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/$py
1d3ad0b
make %{?_smp_mflags}
1d3ad0b
cd ..
1d3ad0b
done
1d3ad0b
1d3ad0b
%check
1d3ad0b
make -C python2 check %{?_smp_mflags}
1d3ad0b
make -C python3 check %{?_smp_mflags}
1d3ad0b
1d3ad0b
%install
1d3ad0b
%make_install -C python2
1d3ad0b
1d3ad0b
%files devel
1d3ad0b
%license LICENSE
1d3ad0b
%doc README.md
1d3ad0b
%{_includedir}/pybind11/
1d3ad0b
%{_datadir}/cmake/pybind11/
1d3ad0b
1d3ad0b
1d3ad0b
%changelog
8174232
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-7
8174232
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
8174232
8918228
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
8918228
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8918228
1d3ad0b
* Mon Feb 27 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-5
1d3ad0b
- Full compliance with header only libraries guidelines.
1d3ad0b
1d3ad0b
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-4
1d3ad0b
- As advised by upstream, disable dtypes test for now.
1d3ad0b
- Include patch for tests on bigendian systems.
1d3ad0b
1d3ad0b
* Thu Feb 23 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-3
1d3ad0b
- Make the package arched so that tests can be run on all architectures.
1d3ad0b
- Run tests both against python2 and python3.
1d3ad0b
1d3ad0b
* Wed Feb 22 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-2
1d3ad0b
- Switch to python3 for tests.
1d3ad0b
1d3ad0b
* Sun Feb 05 2017 Susi Lehtola <jussilehtola@fedorapeople.org> - 2.0.1-1
1d3ad0b
- First release.