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
Update per comment on PR #629 . Sort in a version-aware manner #829
Conversation
…uch that 2.7.10 comes AFTER 2.7.2, not before.
Note this copies-and-pastes code from cmp_version instead of adding it as a dependency, I don't think we should add a dependency to setuptools. If you feel it belongs in another file ( I do, but I'm not sure where...), feel free ot modify accordingly. |
I went ahead and moved cmp_version to the _vendor directory/module . Seems an apt location. |
I like the idea that you're keeping the _vendor code separate - that's a good plan. Since cmp_version is a published package, it's probably best if we declare it as a vendored dependency - that is, in But more importantly - pkg_resources already relies on packaging, and I'd be really surprised if
Why not simply use that instead? |
If you want, that's fine. I simplify included my cmp_version implementation On Fri, Oct 28, 2016 at 1:41 PM, Jason R. Coombs notifications@github.com
|
Okay. Thanks for this, but I think we're better off seeking a solution that doesn't involve bringing in more implementations of version parsing. Setuptools only recently deprecated its own version parsing logic for the |
Hmm. As I'm looking at it, I see that you're passing full filenames to the VersionString constructor, but VersionString and cmp_version only talk about taking version strings (i.e. "1.0.0b1" and not filenames like "mypkg-1.0.0b1.egg"). Perhaps it would have worked anyway because it was treating 'mypkg-1' as one part of the version. That makes me think it still might not handle the sorting of 'mypkg-10.0.0' and 'mypkg-2.0.0' properly. |
Update per comment on PR #629 . Sort in a version-aware manner such that 2.7.10 comes AFTER 2.7.2, not before.
This is in response to comment on PR #629 #629 (comment)
This changes the sort to a version-aware method, copied from my project "cmp_version" (https://github.com/kata198/cmp_version ). That project is Public Domain, so there are no licensing concerns.
Enjoy!