Skip to content
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

setup.py deprecated, replaced by pyproject.toml #367

Open
sodul opened this issue Apr 4, 2023 · 1 comment
Open

setup.py deprecated, replaced by pyproject.toml #367

sodul opened this issue Apr 4, 2023 · 1 comment

Comments

@sodul
Copy link

sodul commented Apr 4, 2023

Describe the bug

When installing vsphere-automation-sdk-python@v8.0.0.1 with a recent version of pip we get deprecation warnings that setup.py will no longer be supported starting with pip 23.1.

  DEPRECATION: lxml is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: pyVmomi is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  DEPRECATION: vSphere-Automation-SDK is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

Reproduction steps

pip install git+https://github.com/vmware/vsphere-automation-sdk-python@v8.0.0.1#egg=vSphere-Automation-SDK

Expected behavior

The installation should complete without conflicts or deprecation warnings.

Additional context

We use the SDK alongside many other third party libraries and we need to move forward with recent versions of python, pip, setuptools, etc... This makes it important for us to be able to install the SDK with recent versions of third party libraries.

See pypa/pip#8559

@sodul sodul added the bug label Apr 4, 2023
@aagrawal3 aagrawal3 added enhancement and removed bug labels Apr 5, 2023
@iamrajiv
Copy link

iamrajiv commented May 5, 2023

Hi @sodul,

The deprecation warnings are indicating that the vsphere-automation-sdk-python@v8.0.0.1 package is being installed using the legacy setup.py method and this behavior will no longer be supported starting with pip version 23.1. To fix this issue, follow the steps below:

  1. Upgrade your pip version to the latest using the following command: pip install --upgrade pip
  2. Install the package with the -use-pep517 option as follows: pip install --use-pep517 git+https://github.com/vmware/vsphere-automation-sdk-python@v8.0.0.1#egg=vSphere-Automation-SDK
  3. Verify that the installation was successful by running the following command: pip show vsphere-automation-sdk-python
  4. After these steps, you should no longer see the deprecation warnings and the installation should be completed without conflicts.

Using the --use-pep517 option will force pip to use the new method, which ensures that the package is installed correctly with the latest versions of third-party libraries.

cc: @shwetapurohit @aagrawal3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants