Skip to content

rpm: adjust to current Fedora guidelines#37

Merged
praiskup merged 6 commits intomainfrom
new-package-guidelines
Nov 28, 2021
Merged

rpm: adjust to current Fedora guidelines#37
praiskup merged 6 commits intomainfrom
new-package-guidelines

Conversation

@praiskup
Copy link
Copy Markdown
Owner

@praiskup praiskup force-pushed the new-package-guidelines branch 3 times, most recently from 44f0aac to 404a357 Compare November 26, 2021 16:38

%if %{with wheels}
BuildRequires: python3-devel
BuildRequires: python3-pytest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A technicality, but this BR might be conditionalized on with_check.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW you can also require pytest via a "test" extra and than use %pyproject_buildrequires -r %{?with_check:-x test}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not very nice. Additional options wouldn't be needed if there was a configuration option in setup.py.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What option? Setup.py is not involved directly here at all.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no option to specify setup.py test requirements?
I suppose that direct BuildRequires make this more readable, I think.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

%else
%bcond_without python2
%endif
%bcond_without wheels
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest calling this bcond differently? Maybe:

Suggested change
%bcond_without wheels
%bcond_without pyproject

praiskup pushed a commit that referenced this pull request Nov 27, 2021
@praiskup praiskup force-pushed the new-package-guidelines branch 2 times, most recently from c4ec27c to ee3026e Compare November 27, 2021 19:28
praiskup and others added 6 commits November 27, 2021 21:27
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
After this patch we generated the manual pages differently on systems
with Python >= 3.10.  This is a temporary revert, till we have a proper
fix.

This reverts commit d41d0a4.
Relates: #35
@praiskup praiskup force-pushed the new-package-guidelines branch from d95480b to 9302c83 Compare November 28, 2021 08:55
@praiskup praiskup merged commit 31f695f into main Nov 28, 2021
@praiskup praiskup deleted the new-package-guidelines branch November 28, 2021 09:25
praiskup added a commit that referenced this pull request Nov 28, 2021
The `add_argument_group()` can be used to add additional
title/description for sub-set of arguments.

Follow-up: #35, #37
Complements: 31f695f
Replaces: d41d0a4
praiskup added a commit that referenced this pull request Nov 28, 2021
The `add_argument_group()` can be used to add additional
title/description for sub-set of arguments.

Follow-up: #35, #37
Complements: 31f695f
Replaces: d41d0a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants