forked from pool/python-pybind11
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user