diff --git a/macros.pyproject b/macros.pyproject index cf56ef9..6bf5d01 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -103,7 +103,7 @@ fi # Process all *.dist-info dirs in sitelib/sitearch for site_dir in ${site_dirs[@]}; do for distinfo in %{buildroot}$site_dir/*.dist-info; do - echo "%ghost ${distinfo#%{buildroot}}" >> %{_pyproject_ghost_distinfo} + echo "%ghost %dir ${distinfo#%{buildroot}}" >> %{_pyproject_ghost_distinfo} sed -i 's/pip/rpm/' ${distinfo}/INSTALLER PYTHONPATH=%{_rpmconfigdir}/redhat \\ %{__python3} -B %{_rpmconfigdir}/redhat/pyproject_preprocess_record.py \\ diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 158e379..de2d0a3 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -14,7 +14,7 @@ License: MIT # Increment Y and reset Z when new macros or features are added # Increment Z when this is a bugfix or a cosmetic change # Dropping support for EOL Fedoras is *not* considered a breaking change -Version: 1.18.4 +Version: 1.18.5 Release: 1%{?dist} # Macro files @@ -191,6 +191,10 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog +* Thu Oct 16 2025 Miro Hrončok - 1.18.5-1 +- %%pyproject_extras_subpkg: Only %%ghost the dist-info directory, not the content +- That way, accidentally unpackaged files within are reported as errors + * Mon Sep 01 2025 Miro Hrončok - 1.18.4-1 - Don't exit from pyproject-srpm-macros implementation of %%pyproject_buildrequires - Fixes: rhbz#2391290 diff --git a/tests/python-setuptools_scm.spec b/tests/python-setuptools_scm.spec index 6d4f1be..f5ad5c9 100644 --- a/tests/python-setuptools_scm.spec +++ b/tests/python-setuptools_scm.spec @@ -67,7 +67,7 @@ grep -E 'flake8: (OK|commands succeeded)' toxlog %{?!with_flake8:&& exit 1 || tr # Internal check for our macros # making sure that %%{_pyproject_ghost_distinfo} has the right content test -f %{_pyproject_ghost_distinfo} -test "$(cat %{_pyproject_ghost_distinfo})" == "%ghost %{python3_sitelib}/setuptools_scm-%{version}.dist-info" +test "$(cat %{_pyproject_ghost_distinfo})" == "%ghost %dir %{python3_sitelib}/setuptools_scm-%{version}.dist-info" %files -n python3-setuptools_scm -f %{pyproject_files}