-
Notifications
You must be signed in to change notification settings - Fork 85
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
Expose a way to exclude dependencies #664
base: devel
Are you sure you want to change the base?
Conversation
Hi, thanks for working on this!
|
@kurokobo that is correct. We discussed this when architecting the functionality, and should a package that is excluded have a backslash with a newline, it will likely cause problems. We don't plan to add any specific functionality to permit or deny newlines, but we do intend to add documentation that states that it is in the best interest of everyone for collection maintainers, and EE creators to use pep508 formatted requirements files. We may be going so far to add linting rules, potentially via |
@sivel If we strictly follow pep508, even any comments ( F.Y.I., to support line continuations, we need just one modification (I don't think it will be adopted, but I'll write it down as I think of it😅 ). diff --git a/src/ansible_builder/_target_scripts/introspect.py b/src/ansible_builder/_target_scripts/introspect.py
index 553cf81..c32d121 100644
--- a/src/ansible_builder/_target_scripts/introspect.py
+++ b/src/ansible_builder/_target_scripts/introspect.py
@@ -26,7 +26,7 @@ def read_req_file(path):
def pip_file_data(path):
- pip_content = read_req_file(path)
+ pip_content = read_req_file(path).replace('\\\n', '')
pip_lines = []
for line in pip_content.split('\n'): |
214ab87
to
482de8d
Compare
Comments will be allowed. Any non-pep508 compliant entries are going to be passed through without change, unchecked and unverified. We plan to update the docs that using such non-compliant entries will be considered undefined/unsupported behavior. |
fc1d218
to
254ef4b
Compare
Based on #647
Changes
requirements_parser
Python dependency.--sanitize
option still exists, but is hidden, and it does nothing.EXCLUDE_REQUIREMENTS
only applied to pip before, simply because sanitize_requirements was only ever used for pip, but it now applies to system as well.requirements.txt
entries are simply pushed down topip
(-r
still causes recursive inclusion inline).exclude
schema keyword is added to version3
EE format and requiresansible-builder
version3.1
or higher. Using an older builder version simply errors.Bug Fixes
#
anchor from requirement URLs (e.g.,git+https://git.repo/some_pkg.git#egg=SomePackage
)Example
TODO:
all_from_collection
orfrom_collection
?)