-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve dependencies in the packaging #69
Conversation
Can you give a usage example? |
I would be interested in that too. It is not clear where will the information come from. |
This dist-git pr/7 is the beneficiary of this pr/69. I was hoping to update the dist-git pr/7, once this pr is merged. But I guess it'd be better to discuss on the both pr's to make them in sync... |
I don't think we should be trying to parse the python requirements format into individual names and operations in the spec file, then put them back together in the correct python format in gen-requirements.py. I think the
For upstream, we should have a requirements.txt file in the For downstream - the spec file should create a |
collection_readme.md - make dependencies programmable. |
Ok. We'll need this in the Galaxy collection as well, so please update https://github.com/linux-system-roles/auto-maintenance/blob/master/release_collection.py to add these two files as well, and update the collection README.md |
The following dependency is required for the Ansible Controller: | ||
* jmespath | ||
The following dependencies are required for the Ansible Controller: | ||
%dependencies% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about this some more,
If the user is installing from Galaxy or Automation Hub, the user should know to look in requirements.txt
and/or bindep.txt
if the tooling doesn't use those files automatically (e.g. if you do ansible-galaxy collection install fedora.system_roles
does it know to look in requirements.txt
and ensure those dependencies? If not, then it is the responsibility of the user).
If installing from RPM, the dependencies should automatically be installed - in that case, we should tell the user that.
Perhaps this wording:
## Dependencies
If installing from RPM, the dependencies will be installed with the package. Otherwise, the dependencies are listed
in `requirements.txt` and/or `bindep.txt`.
I'll follow your next suggestion. So, I guess it's not an issue any more. But out of curiosity, to upload to Galaxy, don't we (or can't we) use the collection artifact, e.g., fedora-linux_system_roles-1.1.0.tar.gz? It can be built using the same way in the linux-system-roles dist-git. In creating the package, we could update the README.md for the both fedora and redhat here https://src.fedoraproject.org/rpms/linux-system-roles/pull-request/7#_2__14-26. |
We can, but why would we go through the trouble of building a Fedora rpm just to get the collection bits out of it to upload to Galaxy? I suppose at some point in the future when we can do:
but it might be easier to have a github action that triggers on the github role repo merge to build and publish the collection
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
collection_readme.md - modified the wording in the Dependencies section. collection_requirements.txt - added. release_collection.py - added a support for {requirements,bindep}.txt. removed copying collection_readme.md, which is redundant.
Sorry, @richm. I had to fix the black error (;_;). Could you approve one more time? Thank you!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
collection_requirements.txt - added
collection_readme.md - make dependencies programmable.