14
0

Accepting request 736037 from home:mslacken:ml

- updated to 2.4.2
 * made devel package python version independent
 * added cmake run to install cmake include files

OBS-URL: https://build.opensuse.org/request/show/736037
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=5
This commit is contained in:
Tomáš Chvátal
2019-10-08 10:16:24 +00:00
committed by Git OBS Bridge
parent f3a2c9d630
commit 3565b58fb0
4 changed files with 28 additions and 10 deletions

View File

@@ -18,16 +18,19 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pybind11
Version: 2.3.0
Version: 2.4.2
Release: 0
Summary: Module for operability between C++11 and Python
License: BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/pybind/pybind11
Source: https://files.pythonhosted.org/packages/53/bc/0880e869d1a4bfd7954835d67e6d5e2c8a30c3fd6372134a4be79a842a4c/pybind11-%{version}.tar.gz
Source: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz#/pybind11-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: python-rpm-macros
BuildArch: noarch
@@ -39,36 +42,44 @@ and vice versa, mainly to create Python bindings of existing C++
code. It can reduce boilerplate code in traditional extension modules
by inferring type information using compile-time introspection.
%package devel
%package -n %{name}-devel
Summary: Development files for pybind11
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: python-devel
%description devel
%description -n %{name}-devel
This package contains files for developing applications using pybind11.
%prep
%setup -q -n pybind11-%{version}
# calling cmake to install header to right location and
# generate cmake include files
echo "python_files devel = %{python_files devel}"
%build
%python_build
%cmake
%cmake_build
%install
%python_install
%cmake_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# removing duplciated header files
rm -rv %{buildroot}%{_includedir}/python2.*/pybind11/
rm -rv %{buildroot}%{_includedir}/python3.*/pybind11
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/*
%files %{python_files devel}
%defattr(-,root,root)
%files -n %{name}-devel
%{_includedir}/pybind11
%license LICENSE
%{python_sysconfig_path include}
%{_datadir}/cmake/pybind11
%changelog