-
Notifications
You must be signed in to change notification settings - Fork 310
Optimized setup.py for version control #166
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
Conversation
Signed-off-by: Khachatur Nazaretyan <[email protected]>
@khnazaretyan Thank you! This looks really good! |
@tianhao64 Sorry for the delay in response and many thanks for the review. Unfortunately I haven't found any way to have wildcards for Another way to simplify maintenance and versioning, could be to exclude the version specifier completely from whl. files (e.g. vapi_runtime -2.12.0 -py2.py3-none-any.whl -> vapi_runtime-py2.py3-none-any.whl) and have versioning using only git tags in repo. In that case we should change only general SDK version (preferably to the same as git tag) in setup.py with each new version of whl. |
@khnazaretyan Thanks for the suggestion. |
@tianhao64 Yes, you're absolutely right. In that case it might be hard to differentiate the versions of the wheels. It would be good to have the tag of the this version so we can have consistent installations by |
@khnazaretyan yes, that makes sense. However, I am facing an issue now. We had previously create a few tags/releases with versions that match vsphere versions originally. Although the bindings follow semantic versioning, the github repo versions don't. The github tags/releases don't mean too much previously as it's not tied to setup.py or pip, which was just a snapshot of the repo. |
@tianhao64 Yes, you're right, I've also seen the tags. As far as I see, in general, we have 4 options:
For me is the first option fully acceptable, but I don't know how critical are the old tags/snapshots. |
@khnazaretyan Thank you! These suggestions are great! I'd prefer the second option. All bindings are backward compatible and we always recommend users to get the latest released bindings regardless of there vCenter versions, therefore I don't think the old tags are critical, but just in case people still using/referring them, they can still do so with the renamed tags. Again really appreciate your effort and contribution to the project!! |
@tianhao64 Thank you so much for effective collaboration and your efforts for maintaining this repo!! |
This PR optimises pip setup by referencing already cloned files instead of downloading them from https git repo.
It also simplifies version management and installation by removing any repository specific information (branch/tag/commit) from setup.py. Each version of repo (tag/branch/commit) can have its own mapping between setup.py and wheel names.
After merging the same installation method should still be used:
This method was tested across different OS Versions (Linux CentOS/Photon, Mac OS X, Windows).
Find below the test results:
Notes:
localhost
in path url to have compatibility across platforms.pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git@<VERSION TAG>
MacOS X (venv)
Python 2
Python 3
CentOS 7
Python2
Python3
Photon
Python2
Python3
Windows 10
Python2 (2.7.16)
Python3 (3.7.3)