rpm: adjust to current Fedora guidelines#37
Conversation
44f0aac to
404a357
Compare
rpm/argparse-manpage.spec.tpl
Outdated
|
|
||
| %if %{with wheels} | ||
| BuildRequires: python3-devel | ||
| BuildRequires: python3-pytest |
There was a problem hiding this comment.
A technicality, but this BR might be conditionalized on with_check.
There was a problem hiding this comment.
BTW you can also require pytest via a "test" extra and than use %pyproject_buildrequires -r %{?with_check:-x test}
There was a problem hiding this comment.
This one is not very nice. Additional options wouldn't be needed if there was a configuration option in setup.py.
There was a problem hiding this comment.
What option? Setup.py is not involved directly here at all.
There was a problem hiding this comment.
There's no option to specify setup.py test requirements?
I suppose that direct BuildRequires make this more readable, I think.
There was a problem hiding this comment.
There is, but it's deprecated together with setup.py test command, and not exposed via any suitable PEP 517/518 API.
Considering you maintain the spec upstream, I agree that listing pytest explicitly might be easier, but with a more common downstream/upstream relationship, the spec file is downstream only and hence doing it the proposed way is more future-proof (when upstream adds a new test dependency, the spec file remains unchanged). Feel free to dismiss this suggestion for this particular project thou.
rpm/argparse-manpage.spec.tpl
Outdated
| %else | ||
| %bcond_without python2 | ||
| %endif | ||
| %bcond_without wheels |
There was a problem hiding this comment.
May I suggest calling this bcond differently? Maybe:
| %bcond_without wheels | |
| %bcond_without pyproject |
c4ec27c to
ee3026e
Compare
rpm: create read-only spec file from template This is to avoid accidental edits of the generated file.
Drop the test-time six requirement When using the try-except idiom with ImportError we can avoid that.
From Python 3.10, we test 'pip install .' same as 'python setup.py install' (setup.py install is deprecated).
Preserve the environment when running pip or setup.py from within the tests
d95480b to
9302c83
Compare
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/