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

Installing additional packages during setup breaks corporate setups #49

Open
schlomo opened this issue Oct 2, 2020 · 1 comment
Open

Comments

@schlomo
Copy link

schlomo commented Oct 2, 2020

See

setup_requires=['setuptools_scm'],

and see pytest-dev/pytest-xdist#136 for more like that.

My problem is that I use pytest-black in a corporate setting where we don't access PyPi directly but via a local Artifactory.

I create a pip.ini pointing to that and everything works well till pytest-black is installed:

 Collecting pytest-black
   Downloading https://<CORPORATE_PYPI_MIRROR_URL>/artifactory/api/pypi/pypi-remote/packages/packages/06/5b/310316ed57560ea90cfa6a5e79cd4bf49f9869b7a12fd9905aa9c93b8a4a/pytest-black-0.3.11.tar.gz
     ERROR: Command errored out with exit status 1:
      command: 'c:\Python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\users\\root\\Temp\\pip-install-30_ojaqj\\pytest-black\\setup.py'"'"'; __file__='"'"'C:\\users\\root\\Temp\\pip-install-30_ojaqj\\pytest-black\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\users\root\Temp\pip-install-30_ojaqj\pytest-black\pip-egg-info'
          cwd: C:\users\root\Temp\pip-install-30_ojaqj\pytest-black\
     Complete output (26 lines):
     Download error on https://pypi.org/simple/setuptools_scm/: [WinError 10051] Windows Error 0x2743 -- Some packages may not be found!
     Download error on https://pypi.org/simple/setuptools-scm/: [WinError 10051] Windows Error 0x2743 -- Some packages may not be found!
     Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
     Download error on https://pypi.org/simple/: [WinError 10051] Windows Error 0x2743 -- Some packages may not be found!
     No local packages or working download links found for setuptools_scm

In the log output I can see that pip install -r requirement.txt which includes pytest-black downloads pytest-black from our PyPi mirror but then setuptools tries to download setuptools_scm from PyPi directly.

So, could you please kindly fix this? Maybe not rely on pulling packages during installation, declaring them as a dependency so that pip will provide them or maybe distributing pytest-black as a wheel can help.

Thanks a lot!

@soerenwolfers
Copy link

This has been fixed in setuptools 42.0.0, which switched to using pip to resolve setup_requires (https://setuptools.readthedocs.io/en/latest/history.html#v42-0-0).

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

No branches or pull requests

2 participants