-
Notifications
You must be signed in to change notification settings - Fork 9
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
ApiVer for command line #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all new modules should be moved to b2._internal
to discourage anyone from trying to import from them
b2.spec.template
Outdated
@@ -8,7 +8,7 @@ block_cipher = None | |||
# https://github.com/Backblaze/B2_Command_Line_Tool/issues/689 | |||
datas = copy_metadata('b2') + collect_data_files('dateutil') | |||
|
|||
a = Analysis(['b2/console_tool.py'], | |||
a = Analysis(['b2/${VERSION}/__main__.py'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happend with the plan to do it with https://pyinstaller.org/en/stable/spec-files.html#multipackaging-with-one-file-apps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to keep all the binaries in the same place with some generated files, thus breaking the requirement of them being self-contained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great !
Please address the comment + make sure README explains to user difference between b2
and b2v3
- most importantly, the fact that for scripting they should use b2v3
.
@@ -0,0 +1 @@ | |||
Client binary is now handled with ApiVer methodology in mind. `b2` executable points to the latest stable version, while other versions can be called directly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you also moved internal stuff (also the old ones) to _internal
please also add changed
note in addition to this
noxfile.py
Outdated
versions = get_versions() | ||
|
||
# It is assumed that the last element will be the "latest stable". | ||
# This may not hold true after version 10. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding key=lambda x: [int(num) for num in re.findall(r'\d+', x)]
in get_versions should fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with a slightly different solution, that matches the behaviour of the b2/_internalg/version_listing.py:get_versions()
.
d4f481a
to
7604c0d
Compare
- `b2`, `b2v3` and unstable `_b2v4` scripts and binaries are now built. - Tests are ran against all available versions. - Both unit and integration tests have the ability to limit versions on which given tests are running. - `doc` is built only for the latest stable version. - Implementation moved to `_internal` to discourage people from importing it.
1889378
to
b291298
Compare
_b2v4
,b2v3
andb2
(pointing tob2v3
) provided as binaries;3
and4
;sut
;doc
is built for the latest stable version.