From 48e7fe4181c5c53456b4883283ea5ec9c750f16b8cc41195db86d4e5d72baa5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 17 Jul 2020 06:35:58 +0000 Subject: [PATCH] Accepting request 821380 from home:StefanBruens:branches:science - Also expand generation of test binaries for Python 2 and 3, fixes Leap 15.x builds where Python 2 is still built. OBS-URL: https://build.opensuse.org/request/show/821380 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=21 --- python-pybind11.changes | 6 ++++++ python-pybind11.spec | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/python-pybind11.changes b/python-pybind11.changes index de29951..473e8d8 100644 --- a/python-pybind11.changes +++ b/python-pybind11.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 17 01:00:06 UTC 2020 - Stefan BrĂ¼ns + +- Also expand generation of test binaries for Python 2 and 3, + fixes Leap 15.x builds where Python 2 is still built. + ------------------------------------------------------------------- Mon Jul 6 14:56:54 UTC 2020 - Christian Goll diff --git a/python-pybind11.spec b/python-pybind11.spec index 0c15fec..8d4ec1f 100644 --- a/python-pybind11.spec +++ b/python-pybind11.spec @@ -64,24 +64,28 @@ This package contains files for developing applications using pybind11. %python_build # calling cmake to install header to right location and # generate cmake include files +%{python_expand pushd . %cmake \ -DPYBIND11_INSTALL=ON \ -DPYBIND11_TEST=ON \ + -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/$python \ %cmake_build +popd +} %install %python_install -%cmake_install +%python_expand %cmake_install %python_expand %fdupes %{buildroot}%{$python_sitelib} # removing duplicated header files rm -rfv %{buildroot}%{_includedir}/python2.*/pybind11/ rm -rfv %{buildroot}%{_includedir}/python3.*/pybind11 -#%%check +%check # test fails as python3-widget is not in distribuion rm tests/test_embed/test_interpreter.py -%pytest +%pytest %files %{python_files} %doc README.md