14
0

Accepting request 1003624 from home:bnavigator:branches:devel:languages:python

- Work around long standing rpm-directory-to-symlink-bug
  * https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
  * rh#447156
  * use shell instead of lua for pretrans scriptlet

OBS-URL: https://build.opensuse.org/request/show/1003624
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybind11?expand=0&rev=36
This commit is contained in:
2022-09-15 12:20:26 +00:00
committed by Git OBS Bridge
parent 904456585f
commit 3e6bf1e682
2 changed files with 22 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Sep 14 21:02:16 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Work around long standing rpm-directory-to-symlink-bug
* https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
* rh#447156
* use shell instead of lua for pretrans scriptlet
-------------------------------------------------------------------
Sun Sep 11 00:15:11 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@@ -137,6 +137,16 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py"
%pytest $ignore_tests
%endif
%pretrans devel
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
# rh#447156
# Do not bother with .rpmmoved suffix. This is a system controlled namespace,
for path in "%{python_sitelib}/pybind11/share/cmake" "%{python_sitelib}/pybind11/include"; do
if [ -d "$path" -a ! -L "$path" ]; then
rm -r "$path"
fi
done
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative pybind11-config
@@ -153,6 +163,8 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py"
%license LICENSE
%python_alternative %{_bindir}/pybind11-config
%{python_sitelib}/pybind11
%exclude %{python_sitelib}/pybind11/share/cmake
%exclude %{python_sitelib}/pybind11/include
%{python_sitelib}/pybind11-%{version}*-info
%files -n %{name}-common-devel
@@ -162,6 +174,8 @@ ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py"
%files %{python_files devel}
%license LICENSE
%{python_sitelib}/pybind11/share/cmake
%{python_sitelib}/pybind11/include
%endif
%changelog