vmware / vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
MIT License
745 stars 313 forks source link

No LICENSE.txt file in the package #388

Closed JeanMichelDaivope closed 1 year ago

JeanMichelDaivope commented 1 year ago

Describe the bug

It seems that the LICENSE.txt file is missing in the vsphere-automation-sdk-python-0.0.1.tar.gz file : I have an error while installing this python package :

python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-ibft9_5p/vsphere-automation-sdk-python_70513919cd4c43c4b6dd456adcc8efb6/setup.py", line 13, in <module>
          license=read('LICENSE.txt'),
        File "/tmp/pip-install-ibft9_5p/vsphere-automation-sdk-python_70513919cd4c43c4b6dd456adcc8efb6/setup.py", line 5, in read
          with open(os.path.join(os.path.dirname(__file__), fname)) as fn:
      FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-ibft9_5p/vsphere-automation-sdk-python_70513919cd4c43c4b6dd456adcc8efb6/LICENSE.txt'
      [end of output]

Reproduction steps

  1. Run install : /usr/bin/python3 -m pip install --cache-dir=/output/wheels vsphere-automation-sdk-python

  2. ...

Expected behavior

The vsphere-automation-sdk-python-0.0.1 installs successfully

Additional context

bash-4.4# python3 --version
Python 3.8.12
bash-4.4# pip --version
pip 23.1.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
aagrawal3 commented 1 year ago

Hi @JeanMichelDaivope Please refer to our installation guide https://github.com/vmware/vsphere-automation-sdk-python#quick-start-guide

JeanMichelDaivope commented 1 year ago

Hi @JeanMichelDaivope Please refer to our installation guide https://github.com/vmware/vsphere-automation-sdk-python#quick-start-guide

Thanks @aagrawal3 for your quick answer. Of course it works through github, but the tool I use needs to install it like any other regular python package (i.e pip install vsphere-automation-sdk-python... ) And this does not work because the Py package is not valid : It does not contains the LICENCE.txt file OR the setup directive is wrong :

import os
from setuptools import setup

def read(fname):
    with open(os.path.join(os.path.dirname(__file__), fname)) as fn:
        return fn.read()

setup(
    name='vsphere-automation-sdk-python',
    version='0.0.1',
    description='vsphere-automation-sdk-python',
    long_description=read('README.rst'),
    **license=read('LICENSE.txt'),**
    author='VMware, Inc.',
    url='https://github.com/vmware/vsphere-automation-sdk-python',
)

Here are the tar contents : image

Can you please fix the setup section or add the missing file ?

aagrawal3 commented 1 year ago

Hi @JeanMichelDaivope

Please note that our python SDK is not published on PyPI, although there is a placeholder for it https://pypi.org/project/vsphere-automation-sdk/#description

A regular pip install through PyPI will not work. You can try local installation option if you do not wish to install through http url. https://github.com/vmware/vsphere-automation-sdk-python#2-local-installation

aagrawal3 commented 1 year ago

Answered. Closing this issue. Please feel free to reopen if needed.