-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: parse requirements.txt
with locally referenced packages
#315
Comments
Root Cause: Also - worth stating that given the example provided, we will not be able to determine the version for any locally referenced requirements through a |
Signed-off-by: Paul Horton <phorton@sonatype.com>
@madpah i dont see an actual urge for this feature, and i dont see it as a bug. but it is a convenient feature, no doubt. |
I agree @jkowalleck - will remove the bug label. |
@madpah |
Hey @mostafa - thanks for getting involved. This was absolutely my plan. However, since this ticket was created, the logic/classes that use Would be great to get a PR from you to make this change, but worth nothing we have a large(ish) release due to land probably next week now, so you might want to wait until that is merged before you branch. |
This issue was moved back to |
Perfect! Just give me a nod when you release next week. Alternatively, I can start working on the feature off the branch you want to merge and then rebase from the default branch after merging. Up to you! 🙂 |
Hey @mostafa - we've released Thanks! |
@madpah I forked the master branch and tried to test the library locally but ran into an issue: ======================================================================
ERROR: test_conda_list_explicit_md5 (tests.test_parser_conda.TestCondaParser)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/somewhere/cyclonedx-python/tests/test_parser_conda.py", line 46, in test_conda_list_explicit_md5
parser = CondaListExplicitParser(conda_data=conda_list_ouptut_fh.read())
File "/somewhere/cyclonedx-python/cyclonedx_py/parser/conda.py", line 41, in __init__
self._conda_packages_to_components()
File "/somewhere/cyclonedx-python/cyclonedx_py/parser/conda.py", line 68, in _conda_packages_to_components
c.external_references.add(ExternalReference(
AttributeError: 'list' object has no attribute 'add' Is this something you're aware of? Or should I create a separate issue? |
@mostafa - not aware of this issue, and concerned as tests are passing in CI too. If you can raise an Issue for this, I’ll investigate later today. Thanks again 🙏 |
@madpah I saw the passing tests, which is why I am confused, but I'll create a separate issue for it. |
@madpah It's a dependency issue on my machine. So, my bad. 🤦 |
We don't have locally referenced packages, but we do have a private pypi repo, and it appears that the |
Tool might not supports all the features people use in their please open another issue, if you want to request another feature for the requirements parser. |
requirements.txt
requirements.txt
with locally referenced packages
requirements.txt
with locally referenced packagesrequirements.txt
with locally referenced packages
@madpah @jkowalleck Also, the |
just for the record: I do not have any opinion about a particular requirements-file-parser. Unlike @madpah I never dug deep into this topic. regarding
For string input we could create a temp file and run |
I already did. See my post above and #318 |
for discussions, feel free to switch to #319 |
One more thing that's definitely off-topic: |
As per issue #284 raised by @Jonas-vdb.
Some development teams add local references to other packages in their
requirements.txt
files. This is currently causing an exception:The text was updated successfully, but these errors were encountered: