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

Improve dependencies in the packaging #69

Merged
merged 1 commit into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lsr_role2collection/collection_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ NOTE: Some roles are not supported in RHEL6 and RHEL7. For more details about th

## Dependencies

The following dependency is required for the Ansible Controller:
* jmespath
If installing from RPM, the dependencies will be installed with the package.
Otherwise, the dependencies are listed in `requirements.txt` and/or `bindep.txt`.

## Installation

Expand Down
2 changes: 2 additions & 0 deletions lsr_role2collection/collection_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jmespath
netaddr
11 changes: 10 additions & 1 deletion release_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ def build_collection(src_path, dest_path, galaxy, coll_rel, force):
ignore_file_dir = os.path.join(coll_dir, "tests", "sanity")
ignore_file = os.path.join(ignore_file_dir, "ignore-2.9.txt")
collection_readme = os.path.join("lsr_role2collection", "collection_readme.md")
collection_requirements = os.path.join(
"lsr_role2collection", "collection_requirements.txt"
)
collection_requirements_dest = os.path.join(coll_dir, "requirements.txt")
collection_bindep = os.path.join("lsr_role2collection", "collection_bindep.txt")
collection_bindep_dest = os.path.join(coll_dir, "bindep.txt")
ignore_file_src = os.path.join("lsr_role2collection", "extra-ignore-2.9.txt")
ansible_lint = os.path.join("lsr_role2collection", ".ansible-lint")
for rolename, roledata in coll_rel.items():
Expand Down Expand Up @@ -102,7 +108,10 @@ def build_collection(src_path, dest_path, galaxy, coll_rel, force):
ign_fd.write(role_ign_fd.read())
shutil.copy(galaxy["_filename"], coll_dir)
shutil.copy(coll_rel["_filename"], coll_dir)
shutil.copy(collection_readme, coll_dir)
if os.path.exists(collection_requirements):
shutil.copy(collection_requirements, collection_requirements_dest)
if os.path.exists(collection_bindep):
shutil.copy(collection_bindep, collection_bindep_dest)
shutil.copy(ansible_lint, coll_dir)
with open(ignore_file, "a") as ign_fd:
with open(ignore_file_src, "r") as role_ign_fd:
Expand Down