Open biskwikman opened 2 years ago
make env
doesn't install a specific version of pip
, it merely calls python -m venv
, so the pip
version depends on the Python version (env/bin/python --version
).
An --upgrade-deps
option was added to venv
in Python 3.9, but for now we can't use it because we're stuck at Python 3.8. However we could call pip install --upgrade pip setuptools
separately.
oh I see.
I added $(env_bin)/$(pip) install --upgrade pip setuptools
to the $(env)
target like so:
$(env): requirements*.txt
@if [ "$(python)" = "false" ]; then \
echo "Unable to find a 'python' executable. Please make sure that Python is installed."; \
exit 1; \
fi;
@$(python) cli/check-python-version.py
$(python) -m venv $(env)
--> $(env_bin)/$(pip) install --upgrade pip setuptools
$(env_bin)/$(pip) install wheel
$(env_bin)/$(pip) install --require-hashes $$(for f in requirements_*.txt; do echo "-r $$f"; done)
@touch $(env)
But it causes an issue with the installation of misaka. In the end it says that misaka was installed using the legacy setup.py install
method. After setup Liberapay seems to be working and I don't get any failed tests. The output of the entire error is below:
Building wheels for collected packages: filesystem_tree, simplejson, oauthlib, xmltodict, environment, misaka, statistics, pyasn1, cov-core, pytest-cache, gprof2dot, wrapt
Building wheel for filesystem_tree (setup.py) ... done
Created wheel for filesystem_tree: filename=filesystem_tree-1.1.2-py3-none-any.whl size=4261 sha256=4ac2983fc9031b4cb1c61a09510c9c6ad7276a5914a9c1cd4bb7fd061f0ad5eb
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/39/da/ec/916e34a77e4fd5cdc89a784ba0f83d85ca1ad9d9f4e140f21b
Building wheel for simplejson (setup.py) ... done
Created wheel for simplejson: filename=simplejson-3.8.1-cp38-cp38-macosx_10_14_x86_64.whl size=87837 sha256=7b704019dbe11a3e7357474c8d0d09d5ecfe754510a9a5204ba87d59d1350bcc
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/b8/1f/0f/d487874b057187d361875d918bd5872773fe65e4a6cb467f67
Building wheel for oauthlib (setup.py) ... done
Created wheel for oauthlib: filename=oauthlib-2.0.2-py3-none-any.whl size=120153 sha256=554087943b7b44ddd3c60a770da86e826dc36a5cbb0c035e4b08ba97d80b3027
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/7b/5a/86/7f3d2fe4167eeeaae40359834ed7cc8fa5907eccb652cf9a7e
Building wheel for xmltodict (setup.py) ... done
Created wheel for xmltodict: filename=xmltodict-0.8.4-py3-none-any.whl size=5679 sha256=8ba1eeb9684d934d9a0ddc9d68d0bcb349abb84daa9895dabba6486321a134dc
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/d8/00/ec/212b3e5248cc8765a80342fd63c00b636cb11585fa7018ea7f
Building wheel for environment (setup.py) ... done
Created wheel for environment: filename=environment-1.0.0-py3-none-any.whl size=5781 sha256=bc9ae0da31697c14e40aa6e4593cb62fac213c087aa85dbbde4b0faf93a3035c
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/70/fd/4a/560ed699c0aa2469d9d3eb4df790f85054ad8e24e4b06b91d9
Building wheel for misaka (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/setup.py", line 42, in <module>
setup(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
_install_setup_requires(attrs)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
dist = best[req.key] = env.best_match(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
return self.obtain(req, installer)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
return installer(requirement)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 96, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 104, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 148, in _convert_metadata
os.rename(dist_info, egg_info)
OSError: [Errno 66] Directory not empty: '/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/.eggs/cffi-1.15.1-py3.8-macosx-10.14-x86_64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/.eggs/cffi-1.15.1-py3.8-macosx-10.14-x86_64.egg/EGG-INFO'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for misaka
Running setup.py clean for misaka
error: subprocess-exited-with-error
× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/setup.py", line 42, in <module>
setup(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
_install_setup_requires(attrs)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 789, in resolve
dist = best[req.key] = env.best_match(
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1075, in best_match
return self.obtain(req, installer)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1087, in obtain
return installer(requirement)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 96, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 104, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/danielhenri/Projects/liberapay.com/env/lib/python3.8/site-packages/setuptools/wheel.py", line 148, in _convert_metadata
os.rename(dist_info, egg_info)
OSError: [Errno 66] Directory not empty: '/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/.eggs/cffi-1.15.1-py3.8-macosx-10.14-x86_64.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/d_/zx1p5fy963n159kb3n835yfh0000gn/T/pip-install-cyi8r4yj/misaka_77614f72e2fb40449e51a665c6bb1b6b/.eggs/cffi-1.15.1-py3.8-macosx-10.14-x86_64.egg/EGG-INFO'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for misaka
Building wheel for statistics (setup.py) ... done
Created wheel for statistics: filename=statistics-1.0.3.5-py3-none-any.whl size=7439 sha256=43ce5236b969cf8d7cc1bf9412ca13e629deca5c9149143cc24c73f731f240a5
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/36/4b/c7/6af97584669b756c0d60c5ff05d5fb1f533a4e4d96e5ee92b9
Building wheel for pyasn1 (setup.py) ... done
Created wheel for pyasn1: filename=pyasn1-0.1.3-py3-none-any.whl size=29972 sha256=af8c0e5f6d6b8bce061ea7c3e5f04cf5b30db8fdc0aeef6e4b5d6597ac382521
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/93/ca/69/92aa5ec5bd2daf5396dfcdc1be45dfa979c90117b7b8ee4bea
Building wheel for cov-core (setup.py) ... done
Created wheel for cov-core: filename=cov_core-1.15.0-py3-none-any.whl size=6011 sha256=f82b5956fdaa8ca407adfae84bdfd31696e47f115ae2bae1b3052ad6231f2363
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/97/e3/bf/78775cdf9d864418109fe07116adb3a5ef713eda6c0f23043f
Building wheel for pytest-cache (setup.py) ... done
Created wheel for pytest-cache: filename=pytest_cache-1.0-py3-none-any.whl size=6934 sha256=893b5b7fcedef275e269ea0fe7dae6d167e3c6c50b5022ae4a93d67d06945a73
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/b0/6b/0c/1c2ea392b4844c5c252cc2f5c0b2dcc852b76e4bab99936055
Building wheel for gprof2dot (setup.py) ... done
Created wheel for gprof2dot: filename=gprof2dot-2021.2.21-py3-none-any.whl size=27744 sha256=815bf9ec1e24db41d8f2e912c424f763856d9ab4b712d1b3cf2088efbb729bfe
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/a2/17/3c/7a853d315d88ab1feee803a5de2f75f09d9475d81772f11c10
Building wheel for wrapt (setup.py) ... done
Created wheel for wrapt: filename=wrapt-1.12.1-cp38-cp38-macosx_10_14_x86_64.whl size=46639 sha256=db5f153d4e1add43352065baefb4c2bf3f1f5e9fdc2f4ed6c9c43fdbf35722a9
Stored in directory: /Users/danielhenri/Library/Caches/pip/wheels/5f/fd/9e/b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73
Successfully built filesystem_tree simplejson oauthlib xmltodict environment statistics pyasn1 cov-core pytest-cache gprof2dot wrapt
Failed to build misaka
Installing collected packages: xmltodict, wrapt, webencodings, wcwidth, text-unidecode, simplejson, pytz, python-mimeparse, pyasn1, OpenCC, oauthlib, mccabe, iniconfig, gprof2dot, funcsigs, first, filesystem_tree, environment, docutils, dnspython, dependency_injection, certifi, cached-property, asn1crypto, urllib3, toml, statistics, state-chain, six, PyYAML, pyparsing, pyflakes, pycparser, pycodestyle, py, psycopg2-binary, pluggy, multidict, more-itertools, MarkupSafe, jmespath, idna, html2text, gunicorn, entrypoints, coverage, chardet, cbor2, Babel, attrs, atomicwrites, apipkg, yarl, sentry-sdk, requests, python-dateutil, psycopg2-pool, packaging, mailshake, libsass, Jinja2, html5lib, flake8, execnet, cov-core, cffi, aspen, vcrpy, stripe, requests-oauthlib, pytest, postgres, pando, misaka, Faker, cryptography, botocore, aspen-jinja2, s3transfer, pytest-profiling, pytest-cov, pytest-cache, pyOpenSSL, ndg-httpsclient, boto3
Running setup.py install for misaka ... done
DEPRECATION: misaka was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. Discussion can be found at https://github.com/pypa/pip/issues/8368
Successfully installed Babel-2.10.1 Faker-8.1.0 Jinja2-2.11.3 MarkupSafe-2.0.1 OpenCC-1.1.3 PyYAML-5.4.1 apipkg-1.5 asn1crypto-0.24.0 aspen-1.0rc7 aspen-jinja2-0.5 atomicwrites-1.4.0 attrs-20.3.0 boto3-1.17.76 botocore-1.20.76 cached-property-1.3.1 cbor2-5.3.0 certifi-2020.12.5 cffi-1.14.0 chardet-4.0.0 cov-core-1.15.0 coverage-5.5 cryptography-3.3.2 dependency_injection-1.2.0 dnspython-1.15.0 docutils-0.13.1 entrypoints-0.3 environment-1.0.0 execnet-1.8.0 filesystem_tree-1.1.2 first-2.0.1 flake8-3.9.1 funcsigs-1.0.2 gprof2dot-2021.2.21 gunicorn-19.9.0 html2text-2019.8.11 html5lib-1.1 idna-2.10 iniconfig-1.1.1 jmespath-0.10.0 libsass-0.20.1 mailshake-2.2 mccabe-0.6.1 misaka-2.1.1 more-itertools-8.7.0 multidict-5.1.0 ndg-httpsclient-0.5.1 oauthlib-2.0.2 packaging-20.9 pando-0.47 pluggy-0.13.1 postgres-4.0 psycopg2-binary-2.8.6 psycopg2-pool-1.1 py-1.10.0 pyOpenSSL-18.0.0 pyasn1-0.1.3 pycodestyle-2.7.0 pycparser-2.20 pyflakes-2.3.1 pyparsing-2.4.7 pytest-6.2.3 pytest-cache-1.0 pytest-cov-2.11.1 pytest-profiling-1.7.0 python-dateutil-2.8.1 python-mimeparse-1.6.0 pytz-2022.1 requests-2.25.1 requests-oauthlib-0.8.0 s3transfer-0.4.2 sentry-sdk-1.4.3 simplejson-3.8.1 six-1.12.0 state-chain-1.4.0 statistics-1.0.3.5 stripe-2.35.1 text-unidecode-1.3 toml-0.10.2 urllib3-1.26.5 vcrpy-4.1.1 wcwidth-0.2.5 webencodings-0.5.1 wrapt-1.12.1 xmltodict-0.8.4 yarl-1.6.3
When I run
make env
on a fresh Liberapay setup, I get the following error:I think this has to do with the pip version Liberapay uses. I updated it from 20.2.3 to 22.2.2 and it was able to find the correct version of OpenCC then.
This could just be an issue on my end, as I'm trying to set up a Liberapay development environment on a new mac. But my local version of pip is 22.2.2. Not sure if that affects it.