Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] support variable %python in %python_module #88

Closed
wants to merge 1 commit into from

Conversation

bnavigator
Copy link
Collaborator

This allows us to put boolean rpm dependencies into %{python_module } referring to the expanded python flavor.

Example package

BuildRequires:  %{python_module ABCD36 and %python-base <= 3.6}
BuildRequires:  %{python_module ABCD38 and %python-base >= 3.8}
BuildRequires:  %{python_module XYZ and %python-XYZ2 and NOPY}
> osc build
...
buildinfo is broken... it says:
unresolvable: nothing provides (python36-ABCD36 and python36-base <= 3.6)
      nothing provides (python38-ABCD36 and python38-base <= 3.6)
      nothing provides (python36-ABCD38 and python36-base >= 3.8)
      nothing provides (python38-ABCD38 and python38-base >= 3.8)
      nothing provides (python36-XYZ and python36-XYZ2 and NOPY)
      nothing provides (python38-XYZ and python38-XYZ2 and NOPY)

(In a real world package, replace the and %python-base <= 3.6 with if %python-base <= 3.6)

@bnavigator bnavigator marked this pull request as ready for review January 19, 2021 23:07
@bnavigator
Copy link
Collaborator Author

@DimStar77, any thoughts on this? It has to go to the prjconf.

@bnavigator bnavigator changed the title support variable %python in %python_module [WIP] support variable %python in %python_module Jan 19, 2021
@bnavigator
Copy link
Collaborator Author

#89: Turns out, none of these changes in the python-rpm-macros package have any effect. Only the change in the prjconf does.

@bnavigator bnavigator closed this Jan 20, 2021
@DimStar77
Copy link
Contributor

#89: Turns out, none of these changes in the python-rpm-macros package have any effect. Only the change in the prjconf does.

prjconf does not take you out of the responsibility to provide the proper information also int he rpm: users might want to inspect some logic locally as well.

as for build using OBS / osc 'beating' rpm provided info: it's in ~/.rpmrc, i.e. user confg beats system config.

The config in prjconf MUST be kept at a bare minimum though

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.

None yet

2 participants