remove both C++ and Cython source files

This commit is contained in:
Filipe Rosset 2026-07-31 00:20:33 -03:00
commit 6bbc2a92ca

View file

@ -90,16 +90,18 @@ export FORCE_CYTHON=1 SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%install
%pyproject_install
# Remove C++ source files installed into site-packages
# Remove C++ and Cython source files installed into site-packages
find %{buildroot}%{python3_sitearch}/cartopy/ -name "*.cpp" -delete
find %{buildroot}%{python3_sitearch}/cartopy/ -name "*.pyx" -delete
# Fix shebang in non-executable script
sed -i -e '/^#!/d' %{buildroot}%{python3_sitearch}/cartopy/feature/download/__main__.py
%pyproject_save_files -l %{srcname}
# Remove deleted C++ source files from pyproject_files list
# Remove deleted C++ and Cython source files from pyproject_files list
sed -i '/trace\.cpp/d' %{pyproject_files}
sed -i '/trace\.pyx/d' %{pyproject_files}
mkdir -p %{buildroot}%{_datadir}/cartopy/shapefiles/natural_earth/
for theme in physical cultural; do