diff --git a/python-pybind11.changes b/python-pybind11.changes index 088a5fc..5fc88d2 100644 --- a/python-pybind11.changes +++ b/python-pybind11.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Sep 14 21:02:16 UTC 2022 - Ben Greiner + +- 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 diff --git a/python-pybind11.spec b/python-pybind11.spec index d7dd8ab..fddbc87 100644 --- a/python-pybind11.spec +++ b/python-pybind11.spec @@ -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