-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Implement GetSConsVersion
static method
#4514
Conversation
Not entirely convinced this implementation is the way to go; gonna look at some more examples before digging too deep into this. Marking as a draft for the time being. |
Looks decent to me. Just needs a test. BTW version string can also have post1, and other version strings allowed by pypi.. |
That sort of inconsistency is part of why I think a more thorough implementation would be preferable. Something more along the lines of how python has the more robust |
I'd think you'd most likely be checking for major.minor.patch and the rest could be ignored? |
I suppose that's fair, yeah. If I wanted to brainstorm something more, that'd probably go beyond the original scope of this PR. I'll get some tests up and running then undraft. |
7ed048d
to
264f7c1
Compare
Can you add a blurb in the manpage and (maybe) users guide? User's guide: https://github.com/SCons/scons/blob/master/doc/user/misc.xml#L112 |
The test for
|
Ahhh, silly me; I passed in the raw tuple instead of a broken-down version. Maybe I can add an overload to accept a tuple instead? Either way, it's an easy fix. |
264f7c1
to
0ab1024
Compare
Haven't updated docs before so I'm unsure what I did wrong to make the test fail. EDIT: Oh, duh. Needed to upload the generated files too. Probably. EDIT2: Nevermind, I'm lost. |
0ab1024
to
1a75062
Compare
1a75062
to
e8676f2
Compare
Solves a problem brought up in the SCons Discord about a lack of public api for the current version. Also adds some type hints, as a treat.
Contributor Checklist:
CHANGES.txt
(and read theREADME.rst
)