From f9b128f4ea45e83466c98e1d35e714b442f1c2f364f0bab5817220ba95b01939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 13 Jan 2023 12:02:24 +0000 Subject: [PATCH] Accepting request 1058070 from home:bnavigator:branches:devel:languages:python - Package new pkgconfig file gh#pybind/pybind11#4077 - PEP517 build - Fix multibuild setup: unique packagename for test flavor required OBS-URL: https://build.opensuse.org/request/show/1058070 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=40 --- python-pybind11.changes | 7 +++++++ python-pybind11.spec | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/python-pybind11.changes b/python-pybind11.changes index aea8f27..1f8842d 100644 --- a/python-pybind11.changes +++ b/python-pybind11.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 12 17:50:05 UTC 2023 - Ben Greiner + +- Package new pkgconfig file gh#pybind/pybind11#4077 +- PEP517 build +- Fix multibuild setup: unique packagename for test flavor required + ------------------------------------------------------------------- Wed Jan 4 19:48:22 UTC 2023 - Dirk Müller diff --git a/python-pybind11.spec b/python-pybind11.spec index 47cb81f..3ee6b09 100644 --- a/python-pybind11.spec +++ b/python-pybind11.spec @@ -19,8 +19,10 @@ %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %bcond_without test +%define psuffix -test %else %bcond_with test +%define psuffix %{nil} %endif %if 0%{?suse_version} > 1500 @@ -29,10 +31,9 @@ %bcond_with libalternatives %endif -%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 %define plainpython python -Name: python-pybind11 +Name: python-pybind11%{psuffix} Version: 2.10.3 Release: 0 Summary: Module for operability between C++11 and Python @@ -41,8 +42,10 @@ URL: https://github.com/pybind/pybind11 Source: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz#/pybind11-%{version}.tar.gz Source99: python-pybind11-rpmlintrc BuildRequires: %{python_module devel >= 3.6} -BuildRequires: %{python_module setuptools} -BuildRequires: cmake +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 42} +BuildRequires: %{python_module wheel} +BuildRequires: cmake >= 3.18 BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: python-rpm-macros >= 20220912 @@ -90,7 +93,7 @@ This package contains files for developing applications using pybind11. %build %if !%{with test} -%python_build +%pyproject_wheel # calling cmake to install header to right location and # generate cmake include files %{python_expand pushd . @@ -114,7 +117,7 @@ popd %install %if !%{with test} -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/pybind11-config %{python_expand # %cmake_install @@ -125,7 +128,9 @@ ln -s %{_includedir}/pybind11 %{buildroot}%{$python_sitelib}/pybind11/include/py # same for cmake files: pybind11.get_cmake_dir() rm -r %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11 ln -s %{_datadir}/cmake/pybind11 %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11 -# note: next release will also include pkg-config files here: https://github.com/pybind/pybind11/pull/4077 +# same for pkgconfig +rm %{buildroot}%{$python_sitelib}/pybind11/share/pkgconfig/pybind11.pc +ln -s %{_datadir}/pkgconfig/pybind11.pc %{buildroot}%{$python_sitelib}/pybind11/share/pkgconfig/pybind11.pc %fdupes %{buildroot}%{$python_sitelib} } %endif @@ -185,6 +190,7 @@ end %license LICENSE %{_includedir}/pybind11 %{_datadir}/cmake/pybind11 +%{_datadir}/pkgconfig/pybind11.pc %files %{python_files devel} %license LICENSE @@ -192,6 +198,7 @@ end %ghost %{python_sitelib}/pybind11/share/cmake/pybind11.rpmmoved %{python_sitelib}/pybind11/include %ghost %{python_sitelib}/pybind11/include/pybind11.rpmmoved +%{python_sitelib}/pybind11/share/pkgconfig %endif %changelog