Commit Graph

13 Commits

Author SHA1 Message Date
Lumir Balhar
894e21291e Preprocess dist-info/RECORD file in %install and remove it.
According to PEP 627, the RECORD file is optional and
doesn't make sense to keep it for system packages. Moreover,
its absence should indicate to other tools like pip that
they should not touch such packages.

Now, we process content of all RECORD files to one
pyproject-record (JSON) which is then used in
%pyproject_save_files. That way, we can remove the original
files in %pyproject_install and keep their content for
later.

PEP 627: https://www.python.org/dev/peps/pep-0627/#optional-record-file
2020-09-25 12:24:50 +00:00
Miro Hrončok
b2b33b8a0b Remove superfluous executable permissions 2020-09-09 09:58:34 +02:00
Miro Hrončok
80a2764884 Remove a no longer useful warning for unrecognized files in %pyproject_save_files
The warning is not actionable and with +auto even redundant.
2020-09-07 11:44:48 +02:00
Miro Hrončok
c1d5d64f8c Prevent "File listed twice" warning with %lang files outside of Python modules 2020-09-07 09:42:33 +00:00
Tomas Hrnciar
d754bc75b9 Test for package with lang files located outside of module 2020-09-04 10:39:52 +02:00
Tomas Hrnciar
da3d9bc23d Automatically mark language files with %lang macro 2020-09-04 10:39:52 +02:00
Tomas Hrnciar
1fc1c18fd9 Removes bindir parameter from script
This parameter is not necessary anymore with +auto argument replacing +bindir.
2020-08-06 15:26:37 +02:00
Tomas Hrnciar
5809bbc77e Replace +bindir with +auto in README and spec files 2020-08-06 15:26:37 +02:00
Tomas Hrnciar
d0d4060cec Add test for +auto argument to include .pth files in other files 2020-08-06 15:26:37 +02:00
Tomas Hrnciar
0259b46867 Remove todo comment about .pth files
WRT to addition of +auto argument, all .pth files should be classified
as other files.
2020-08-06 15:26:37 +02:00
Tomas Hrnciar
91c8c27c63 Remove unused "executables" section from script and test data 2020-08-06 15:26:37 +02:00
Tomas Hrnciar
79678f7e72 Replace +bindir argument with +auto to include all unclassified files to
filelist.
2020-08-06 15:26:37 +02:00
Patrik Kopkan
2800b49530 Add %pyproject_save_files macro
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>
2020-04-15 16:45:10 +02:00