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

Multiple top-level packages discovered in a flat-layout - Vsphere SDK #160

Closed
danama opened this issue Mar 28, 2022 · 6 comments
Closed
Labels
Bug caused by dependency There is an issue in NetBox which needs to fixed first
Milestone

Comments

@danama
Copy link

danama commented Mar 28, 2022

Hello,

While in venv during the installation, there is an issue with the Vsphere Automation SDK install. This is also happening if building the docker image and on another system.

Outside of the venv, nothing to report.

Here comes the logs :

Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git
  Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-m46egoho
  Running command git clone --filter=blob:none --quiet https://github.com/vmware/vsphere-automation-sdk-python.git /tmp/pip-req-build-m46egoho
  Resolved https://github.com/vmware/vsphere-automation-sdk-python.git to commit d8ee747115e2ad7505692723c60765824104e3b7
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      error: Multiple top-level packages discovered in a flat-layout: ['lib', 'samples', 'sample_template'].
      
      To avoid accidental inclusion of unwanted files or directories,
      setuptools will not proceed with this build.
      
      If you are trying to create a single distribution with multiple packages
      on purpose, you should not rely on automatic discovery.
      Instead, consider the following options:
      
      1. set up custom discovery (`find` directive with `include` or `exclude`)
      2. use a `src-layout`
      3. explicitly set `py_modules` or `packages` with a list of names
      
      To find more information, look for "package discovery" on setuptools docs.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@bb-Ricardo
Copy link
Owner

Oh, thank you for this hint. I will check it out.

were you able to try the installation with an older version?

@rizlas
Copy link
Contributor

rizlas commented Mar 29, 2022

This is setuptools related. I encountered this yesterday. Sticking with setuptools < 60 works as expected.
pypa/setuptools#3197

@bb-Ricardo
Copy link
Owner

Ahh great, good find. I guess we need to wait until VMware adopted to this behaviour.

There is also an open bug: vmware/vsphere-automation-sdk-python#303

@danama
Copy link
Author

danama commented Mar 29, 2022

Just tested building the Dockerfile with setuptools locked to 60.10.0 and it worked. Thanks !

@bb-Ricardo
Copy link
Owner

This got temporarily fixed with e5d4225

@bb-Ricardo bb-Ricardo added the Bug caused by dependency There is an issue in NetBox which needs to fixed first label May 11, 2022
@bb-Ricardo
Copy link
Owner

now resolved in "development"

@bb-Ricardo bb-Ricardo added this to the 1.3.0 milestone May 20, 2022
andreiKuznets0v pushed a commit to andreiKuznets0v/netbox-sync_try_vcloud that referenced this issue Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug caused by dependency There is an issue in NetBox which needs to fixed first
Projects
None yet
Development

No branches or pull requests

3 participants