Skip to content

Instantly share code, notes, and snippets.

@squeaky-pl
Created November 16, 2019 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save squeaky-pl/2920bb5f472f70346c57e6a859ecda04 to your computer and use it in GitHub Desktop.
Save squeaky-pl/2920bb5f472f70346c57e6a859ecda04 to your computer and use it in GitHub Desktop.
PyPy and mercurial bug
When using my system Python3.6 I can succesfully install mercurial==5.0.2
~/w/portable-pypy ❯❯❯ HGPYTHON3=1 python3.6 -m pip install mercurial==5.0.2 ✘ 1 master ✱ ◼ Collecting mercurial==5.0.2
Cache entry deserialization failed, entry ignored
Installing collected packages: mercurial
Successfully installed mercurial-5.0.2
When using pypy3.6-7.2.0 I get the stacktrace
~/w/portable-pypy ❯❯❯ HGPYTHON3=1 venv-fswitches/bin/pypy -m pip install mercurial==5.0.2 master ✱ ◼ Collecting mercurial==5.0.2
Using cached https://files.pythonhosted.org/packages/a4/77/2d96c46834ad1ca69e2f725c51da980a2c6fc8850879c6683407f9c8fbfc/mercurial-5.0.2.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/squeaky/workspace/portable-pypy/venv-fswitches/bin/pypy -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a7b8av0y/mercurial/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a7b8av0y/mercurial/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 /tmp/pip-install-a7b8av0y/mercurial/pip-egg-info cwd: /tmp/pip-install-a7b8av0y/mercurial/
Complete output (41 lines):
running egg_info
creating /tmp/pip-install-a7b8av0y/mercurial/pip-egg-info/mercurial.egg-info
writing /tmp/pip-install-a7b8av0y/mercurial/pip-egg-info/mercurial.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-a7b8av0y/mercurial/pip-egg-info/mercurial.egg-info/dependency_links.txt writing top-level names to /tmp/pip-install-a7b8av0y/mercurial/pip-egg-info/mercurial.egg-info/top_level.txt writing manifest file '/tmp/pip-install-a7b8av0y/mercurial/pip-egg-info/mercurial.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-a7b8av0y/mercurial/setup.py", line 1477, in <module>
**extra)
File "/home/squeaky/workspace/portable-pypy/pypy3.6-7.2.0-linux_x86_64-portable-fswitches/lib-python/3/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/squeaky/workspace/portable-pypy/pypy3.6-7.2.0-linux_x86_64-portable-fswitches/lib-python/3/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/squeaky/workspace/portable-pypy/pypy3.6-7.2.0-linux_x86_64-portable-fswitches/lib-python/3/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/egg_info.py", line 296, in run
self.find_sources()
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
mm.run()
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/egg_info.py", line 534, in run
self.add_defaults()
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/egg_info.py", line 570, in add_defaults
sdist.add_defaults(self)
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/py36compat.py", line 34, in add_defaults
self._add_defaults_python()
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/site-packages/setuptools/command/sdist.py", line 127, in _add_defaults_python
build_py = self.get_finalized_command('build_py')
File "/home/squeaky/workspace/portable-pypy/pypy3.6-7.2.0-linux_x86_64-portable-fswitches/lib-python/3/distutils/cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "/home/squeaky/workspace/portable-pypy/pypy3.6-7.2.0-linux_x86_64-portable-fswitches/lib-python/3/distutils/cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "/tmp/pip-install-a7b8av0y/mercurial/setup.py", line 535, in finalize_options
from mercurial.cffi import (
File "/tmp/pip-install-a7b8av0y/mercurial/mercurial/cffi/bdiffbuild.py", line 7, in <module>
with open(os.path.join(os.path.join(os.path.dirname(__file__), '..'),
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/lib-python/3/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/home/squeaky/workspace/portable-pypy/venv-fswitches/lib-python/3/genericpath.py", line 151, in _check_arg_types
raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment