Master is red on PyPy 3.5 with setuptools 50.0
See original GitHub issueEnvironment
- pip version: master
- Python version: PyPy 3.5
- OS: Linux? Travis is failing, but I doubt this is OS-dependent.
Red job: https://travis-ci.com/github/pypa/pip/jobs/379292143 Green job: https://travis-ci.com/github/pypa/pip/jobs/379138473
Both are run against 0b18e21, the only different (I believe) is the setuptools version they fetch.
Description
After setuptools 50.0, the test environment fails to populate on PyPy. This is the relevent Tox log:
Attempting uninstall: setuptools
Found existing installation: setuptools 28.8.0
Uninstalling setuptools-28.8.0:
Successfully uninstalled setuptools-28.8.0
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/travis/build/pypa/pip/.tox/pypy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4lh__icz/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/build/pypa/pip/.tox/pypy/include/site/python3.5/cffi
cwd: /tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/
Complete output (58 lines):
'import site' failed
/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/version.py:1: UserWarning: Module _cffi_backend was already imported from None, but /tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb is being added to sys.path
import pkg_resources
Traceback (most recent call last):
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 160, in _subst_vars
return s.format(**local_vars)
KeyError: 'userbase'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 163, in _subst_vars
return s.format(**os.environ)
KeyError: 'userbase'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py", line 263, in <module>
'License :: OSI Approved :: MIT License',
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/core.py", line 134, in setup
ok = dist.parse_command_line()
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/dist.py", line 484, in parse_command_line
args = self._parse_command_opts(parser, args)
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/dist.py", line 903, in _parse_command_opts
nargs = _Distribution._parse_command_opts(self, parser, args)
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/dist.py", line 540, in _parse_command_opts
cmd_class = self.get_command_class(command)
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/dist.py", line 742, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/pkg_resources/__init__.py", line 2447, in load
return self.resolve()
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/pkg_resources/__init__.py", line 2453, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/command/install.py", line 6, in <module>
import distutils.command.install as orig
File "/home/travis/build/pypa/pip/.tox/pypy/site-packages/setuptools/_distutils/command/install.py", line 18, in <module>
from site import USER_BASE
File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 574, in <module>
main()
File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 560, in main
known_paths = addusersitepackages(known_paths)
File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 283, in addusersitepackages
user_site = getusersitepackages()
File "/opt/python/pypy3.5-7.0.0/lib-python/3/site.py", line 272, in getusersitepackages
USER_SITE = get_path('purelib', '%s_user' % os.name)
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 514, in get_path
return get_paths(scheme, vars, expand)[name]
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 504, in get_paths
return _expand_vars(scheme, vars)
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 184, in _expand_vars
res[key] = os.path.normpath(_subst_vars(value, vars))
File "/opt/python/pypy3.5-7.0.0/lib-python/3/sysconfig.py", line 165, in _subst_vars
raise AttributeError('{%s}' % var)
AttributeError: {'userbase'}
----------------------------------------
ERROR: Command errored out with exit status 1: /home/travis/build/pypa/pip/.tox/pypy/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qr7zj_2u/cffi_84f0e538f77b4b2d8960cd13ea04fefb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4lh__icz/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/build/pypa/pip/.tox/pypy/include/site/python3.5/cffi Check the logs for full command output.
Traceback (most recent call last):
File "tools/tox_pip.py", line 31, in <module>
pip(sys.argv[1:])
File "tools/tox_pip.py", line 27, in pip
subprocess.check_call([sys.executable, '-m', 'pip'] + args)
File "/opt/python/pypy3.5-7.0.0/lib-python/3/subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/travis/build/pypa/pip/.tox/pypy/bin/python', '-m', 'pip', 'install', '-r/home/travis/build/pypa/pip/tools/requirements/tests.txt']' returned non-zero exit status 1
Expected behavior The test environment should be populated correctly.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Frequently Asked Questions - PyPy documentation
What is PyPy?¶. PyPy is a reimplementation of Python in Python, using the RPython translation toolchain. PyPy tries to find new answers about...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
when side tabs are on, clicking on a new tab and clicking on the red X to ... if setuptools is missing" status:RESOLVED...
Read more >pikepdf Documentation - Read the Docs
It is a low level library that requires knowledge of PDF internals and some familiarity with the PDF specification. It.
Read more >Release 6.4.4 Pyomo
The standard utility for installing Python packages is pip. ... dependencies can be found in Pyomo's setup.py and displayed using:.
Read more >Biopython Tutorial and Cookbook
3.1 Sequences act like strings; 3.2 Slicing a sequence; 3.3 Turning Seq objects into strings; 3.4 Concatenating or adding sequences; 3.5 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hmm… setuptools’ issue tracker doesn’t look great.
I am not entirely sure it is best to close and shove this under the rug. At least one of the breakages induced by setuptools 50.0 is already confirmed as a pip bug, and there very well may be more. pip needs a detailed (if not complete) accessment to its setuptools compatibiliy and fix the compatibility issues so the world does not break again when the distutils switch eventually happens.