This macro save generates file section to %pyproject_files. It should
simplify %files section and allow to build by some automatic machinery
Supposed use case in Fedora:
%install
%pyproject_install
%pyproject_save_files requests _requests
%files -n python3-requests -f %{pyproject_files}
%doc README.rst
%license LICENSE
Automatic build of arbitrary packages (e.g. in Copr):
%install
%pyproject_install
%pyproject_save_files * +bindir // save all modules with executables
%files -n python3-requests -f %{pyproject_files}
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
The `rm -v` command prints the output to stderr, polluting the generated buildrequires
$ rm -rfv pytest_harvest.dist-info/
removed 'pytest_harvest.dist-info/METADATA'
removed 'pytest_harvest.dist-info/LICENSE'
removed 'pytest_harvest.dist-info/top_level.txt'
removed 'pytest_harvest.dist-info/entry_points.txt'
removed directory 'pytest_harvest.dist-info/'
This can lead to RPM errors:
error: Dependency tokens must begin with alpha-numeric, '_' or '/': 'pytest_harvest.dist-info/METADATA'
Or bogus dependencies -- the SRPM requires "removed" and "directory".
See https://github.com/rpm-software-management/rpm/pull/889
Otherwise you see:
WARNING: The scripts py.test and pytest are installed in '/builddir/build/BUILDROOT/pytest-4.6.4-1.fc31.x86_64/usr/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
And that is not relevant for us.