-
Notifications
You must be signed in to change notification settings - Fork 311
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
PyPI Package #38
Comments
@nmaludy Thanks for the feedback. We are exploring this option. Definitely agree. The install process will be simplified once the dependencies are pushed to pypi. |
@tianhao64 Hi, if available for PyPI, which is convenient for usage. Thanks. |
Hi. Some packages have been uploaded to Pypi: https://pypi.org/search/?q=vapi However the |
I guess this is still outstanding task. It's probably better to prioritise as as distribution packages are key aspect for developer adoption? |
@Lucas-C It's nice that you've actively pushed this out... but it should have been implemented by the software distributor. Otherwise you are occupying the package name, which non-intentionally confuses the community... |
I haven't pushed myself anything related to VMWare / VSphere on https://pypi.org |
Thanks for the clarification, that makes sense 👍 |
Is there any headway on this idea? Simply creating a setup.py file would be a nice start, because then at least we could pip install directly from the repo, i.e.: pip install git+https://github.com/vmware/vsphere-automation-sdk-python |
@tianhao64 any luck with this? |
Sorry, missed the previous message. Thanks for the feedback @Phxntxm, will try it out. |
Yes will really boost the ease of use of the package, that will draw in more contributors. Perhaps someone should help @tianhao64 to put it on pypi |
The reason we can't push these package to pypi is because they contain generated code and the generator is not open sourced yet. AFAIK, only open sourced package can be listed on pypi. Please correct me if I am wrong. |
Ok. The generated code can be added then (not the generator). |
If this code could be published to pypi it would really simplify the setup for many people, we have scripts which set up our current python environment for newcomers to the team and adding this to the requirements.txt would really make life easy. |
Yes, that would definitely be a good thing :-) But in the long run, I think it should be on PyPi. |
A simple setup.py would really be helpful. |
I am not sure the current install process can be simplified by a setup.py. AFAIK, setup.py doesn't support dependency wheels that are not on pypi. The dependency_links option only support egg files. The SDK bindings files depend on runtime and unfortunately we are not ready to open source runtime at this point. |
In setup.py https://github.com/khnazaretyan/vsphere-automation-sdk-python/blob/feat-pip_setup/setup.py Tested with
If the implementation looks ok, please let me know who should be mentioned as "Author" for the package and PR will follow. |
@khnazaretyan This looks promising. It'd be great if it works. Could you post your test result? I try to test it locally, but it failed with: |
@tianhao64 Thanks for your feedback. I have tested in CentOS container separately on python 2 and 3 environments. It's green field test, in case some old preinstalled packages exist For python2 environment Python 2 Test
Output
Python 3
Output
|
@khnazaretyan Appreciated for the detailed info and testing. This looks good! We would like to do more testing on different OS and python versions to validate this before merging the PR. |
Photon with Python 3:
|
Tested on Mac OS X. Test results in python 2/3 virtual environments
Python 2 venv
Python 3 venv
|
Tested on Windows 10. Python 2 (2.7.16)
Python 3 (3.7.3)
|
@khnazaretyan Really appreciate your effort. We have also tested on Windows 10, ubuntu and Mac. I think we are ready take the change at this point. Could you please create a PR? Please use below values for version, description and author instead in setup.py? Other values in your fork look good. Thank you! version='1.0.0', |
While we wait for a response from VMware, have you tried the workaround mentioned in this PR to help ease your automation?
|
Unfortunately I get the same error (which is oddly different than the ones I'm seeing in this ticket) using the file method as I do using the git-based one. Tried both directly from the command line and by adding that line to the Pipfile. I opened #302 to track that issue, but ultimately a PyPi package would likely just resolve the issue. |
It's version 0.0.1 and from April. Good sign, but this looks like a placeholder or test attempt. |
It's file size also suggests its a placeholder. TBH these days I'd be worried about it being a supply chain attack (e.g. https://www.bitdefender.com/blog/hotforsecurity/supply-chain-attack-detected-in-pypi-library/) given the strange version number and lack of updates here. |
In company contexts that have an pypi proxy / cache where projects have to whitelist modules that are authorized to be used in the company context (for security or licence reasons), this renders using vsphere-automation-sdk-python really difficult or impossible. This also begs the question of why some code is only accessible in the .whl files (which are essentially a zip with some metadata) and not in version control like the rest. Is there documentation somewhere on how those modules are generated ? |
@kunal-pmj, @aagrawal3 and @shwetapurohit, could you please give a proper reaction to this issue? Instead of letting this blackhole and closing duplicates. If this is not intended to be solved, close it, don't blackhole it, that does a disservice to your customers and to the open source community. As it stands, the lack of progress on this issue adds to making me deem VMWare unfit for open source collaboration, and thus unfit for this whole endeavour, which makes me unwilling to recommend or work with it in the industry. |
One day too late, but: Happy birthday 🎂 🥳 |
Blockers: |
@aagrawal3 It looks like you are ready to start publishing packages on PyPI, but somehow Well, I don't know how to help you there. But since there are so many people here who want to see this SDK on PyPI: Anyone else around who can help with this? |
Perhaps moving to vmware_rest is a more viable solution |
@wkoot This might be OK for your use cases, but an ansible collection isn't really an alternative if you need the functionality of the SDK ;-) |
Any news on those? |
Bumping this issue as well. Can we get a progress update on both this issue as well as the 2 PyPi blockers mentioned above? |
Hi, Thanks! |
Any news on this? After 7 weeks I think the "near future" is already there... |
Waiting for this also.. |
Following Libraries are available on PyPI : |
FWIW since my first comment here that I made in my 3rd semester, I have now graduated, and I will be heavily disrecommending VMWare in any guest lessons I will give on infrastructure. :3 |
@aagrawal3 @shwetapurohit I'm wondering what those new packages on PyPI really mean. Do I still have to define Or can I define Or would Is this complete, or would there still be things missing in comparison to installing this from GitHub? It's really great to see some progress here, but ATM I don't see what those packages on PyPI mean to me and if they really solve this issue. A little bit more information (and communication) from @kunalpmj Out of curiosity: Are you part of the team working on this, or did you see those packages on PyPI and just wanted to inform informed us about them? |
@mariolenz Including vmware-vcenter would get you vmware-vapi-runtime only and pyvmomi and vmware-vapi-common-client would not get any other SDK component. For vSphere APIs vmware-vcenter, pyvmomi and vmware-vapi-common-client will be enough. |
@kunalpmj Thanks for the clarification! |
Would it be possible to package this SDK into a PyPI package so it's easier to
pip install
and define in a requirements.txt file, rather than having to download this repo and "hand install" it?The text was updated successfully, but these errors were encountered: