-
Notifications
You must be signed in to change notification settings - Fork 517
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
Release version compare code as separate library on pypi? #4081
Comments
More thoughts: Before I get around to releasing this separately...
|
Hello, I can work on this, we need to create a altogether new repo with pip packaging right? |
If at all possible, I'd like to avoid making a separate repo and instead have it packaged from this repo. But it's a moot point as it needs docs before we can even consider that. |
Oh, I should explain that avoiding a separate repo is to make maintenance easier for me. Some of that is simple "all my pull requests are in one spot" kind of stuff, but some of it is more political and policy and release processes. I'm currently the bottleneck for cve-bin-tool development, so if a separate repo is the only way to make this happen then I'll close this bug instead of bothering. |
Ah, understandable. I did some digging, and there is a way, although it will create some clutter inside the |
@terriko Actually we need to add
So they require cve-bin-tool as dependency? So my idea is to add some redundant code in if importlib.util.find_spec("cve_bin_tool.parsers"):
from parsers import Parser
elif importlib.util.find_spec("parsers"):
from cve_bin_tool.parsers import Parser
else:
raise ImportError("Neither 'parsers' nor 'cve_bin_tool.parsers' is installed.") |
Thanks for the research! I think you're looking at the wrong part of cve-bin-tool, which is understandable because I used the wrong terminology in this post (I'll change the title and original description in a sec). But I'm interested in releasing the code in version_compare.py as a separate piece, not the stuff in the |
Ah got it! that makes the work a lot easier now! Checkout the PR above. And let me know if I am heading in the right direction. |
This is more for me than anyone else:
When I was looking for a good generic version parser and version compare in python I tried a few different libraries before (reluctantly) writing the parser we are using as of the 3.3 release.
I think it would probably be nice to release it as a separate library on pypi so people could use it directly without having to install cve-bin-tool, in case anyone else has the same problem I had for handling non pep 440 compliant versions. This is the code in
cve-bin-tool/version_compare.py
and it has tests in the test directory, but currently does not have separate documentation.This issue is a reminder to me to see if the best route is to split it out as a separately-maintained library, or if there's any reasonable way of having build scripts or something to let me do it while keeping the file here.
The text was updated successfully, but these errors were encountered: