poetry: Installing package from git fails on cryptograpghy - Cano not find Rust compiler
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Alpine Linux v3.11
- Poetry version: 1.0.5 <- diclaimer: this is poetry version that we have in prod environment that have this problem but managed to reproduce with poetry 1.1.4 too
- Link of a Gist with the contents of your pyproject.toml file: a) Application pyproject.toml - https://gist.github.com/Ikszad/b4e8c19665220779952622663f3f603c b) Our package pyproject.toml -https://gist.github.com/Ikszad/9514a754f4e09c370ab1907e54052291 c) Base dockerfile - https://gist.github.com/Ikszad/0f002345680c95e384e0b879995622f1 d) Base pyproject.toml - https://gist.github.com/Ikszad/a332db7e7e6a542cfa7595fc6a0871e2 e) Child dockerfile - https://gist.github.com/Ikszad/bee76870470660cca7b5a7f0c6c720d4
Issue
Hello!
Here is an issue that has hit us in the production environment out of nowhere.
We have dockerized environment (dockerfiles gist links c and e) in which there are packages installed based on the two pyproject.toml files (firstly base image d and child image a). Besides that, we have a separate package with its pyproject.toml (b).
We have this packages inside the application pyproject.toml (a) as:
hubspot-integration = {git = "https://SOMEPACKAGE.git", branch="master"}
Now during the poetry install
in the application build (Dockerfile e using pyproject.toml a) it crashes on the package mentioned above during installation of cryptography. What is interesting installation of cryptography package alone (as we have this dependency defined in the pyproject.toml a) works fine.
I tried upgrading pip, setuptools, poetry and neither seem to have any effect.
Thank you for the help
Here is the error message:
- Installing hubspot-integration (0.1.0 1dc3a9d)
[EnvCommandError]
Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--no-deps', '-U', '-e', '/usr/local/src/hubspot-integration'] errored with the following return code 1, and output:
Obtaining file:///usr/local/src/hubspot-integration
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ydp2mpgs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=1.0.0'
cwd: None
Complete output (250 lines):
Collecting poetry>=1.0.0
Downloading https://files.pythonhosted.org/packages/f9/dd/b6ba82de8c075d1a795670ae16952a4c1cb21398b4330d8cfb51241e32d7/poetry-1.1.4-py2.py3-none-any.whl (171kB)
Collecting shellingham<2.0,>=1.1 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/76/94/7a764d57d0f46534e0022e651da6547bc5cfe7b6372e7e0ed1dde6f5cb67/shellingham-1.4.0-py2.py3-none-any.whl
Collecting clikit<0.7.0,>=0.6.2 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/f2/3d/4394c710b9195b83382dc67bdd1040e5ebfc3fc8df90e20fe74341298c57/clikit-0.6.2-py2.py3-none-any.whl (91kB)
Collecting packaging<21.0,>=20.4 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl (40kB)
Collecting requests<3.0,>=2.18 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl (61kB)
Collecting cachy<0.4.0,>=0.3.0 (from poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/82/e6/badd9af6feee43e76c3445b2621a60d3d99fe0e33fffa8df43590212ea63/cachy-0.3.0-py2.py3-none-any.whl
Collecting requests-toolbelt<0.10.0,>=0.9.1 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/60/ef/7681134338fc097acef8d9b2f8abe0458e4d87559c689a8c306d0957ece5/requests_toolbelt-0.9.1-py2.py3-none-any.whl (54kB)
Collecting poetry-core<2.0.0,>=1.0.0 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/a0/56/d7923fb39395c662bab9e6044e290458a77204ea3cafc3b1ea88e27b8f4c/poetry_core-1.0.2-py2.py3-none-any.whl (424kB)
Collecting tomlkit<1.0.0,>=0.7.0 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/bc/01/a0ee34fe37dd54f795e8f8a820af57c9a94d7358276acf6cdc21ae8d9533/tomlkit-0.7.0-py2.py3-none-any.whl
Collecting crashtest<0.4.0,>=0.3.0; python_version >= "3.6" and python_version < "4.0" (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/76/97/2a99f020be5e4a5a97ba10bc480e2e6a889b5087103a2c6b952b5f819d27/crashtest-0.3.1-py3-none-any.whl
Collecting pkginfo<2.0,>=1.4 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/b0/9a/d78e7c299eb5659bc3a036e5a968a399c62bfe0b2aa18baf7d13f43373ba/pkginfo-1.7.0-py2.py3-none-any.whl
Collecting virtualenv<21.0.0,>=20.0.26 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/9f/fb/7423637e48cffbb2e567ca113d2b05068f8b457dde998ab487adf7386c86/virtualenv-20.4.2-py2.py3-none-any.whl (7.2MB)
Collecting html5lib<2.0,>=1.0 (from poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/6c/dd/a834df6482147d48e225a49515aabc28974ad5a4ca3215c18a882565b028/html5lib-1.1-py2.py3-none-any.whl
Collecting keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0" (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/d0/a0/20e656cd1e2313af619e382782bd47b5f77a3f33d81992554f3aac56e90d/keyring-21.8.0-py3-none-any.whl
Collecting pexpect<5.0.0,>=4.7.0 (from poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/39/7b/88dbb785881c28a102619d46423cb853b46dbccc70d3ac362d99773a78ce/pexpect-4.8.0-py2.py3-none-any.whl
Collecting cachecontrol[filecache]<0.13.0,>=0.12.4 (from poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/18/71/0a9df4206a5dc5ae7609c41efddab2270a2c1ff61d39de7591dc7302ef89/CacheControl-0.12.6-py2.py3-none-any.whl
Collecting cleo<0.9.0,>=0.8.1 (from poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/09/46/3577da4237675e90630e8e9ccd2c7dbcd42afd4463712a207eab148dfbc2/cleo-0.8.1-py2.py3-none-any.whl
Collecting pastel<0.3.0,>=0.2.0 (from clikit<0.7.0,>=0.6.2->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/aa/18/a8444036c6dd65ba3624c63b734d3ba95ba63ace513078e1580590075d21/pastel-0.2.1-py2.py3-none-any.whl
Collecting pylev<2.0,>=1.3 (from clikit<0.7.0,>=0.6.2->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/40/1c/7dff1d242bf1e19f9c6202f0ba4e6fd18cc7ecb8bc85b17b2d16c806e228/pylev-1.3.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging<21.0,>=20.4->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Collecting urllib3<1.27,>=1.21.1 (from requests<3.0,>=2.18->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl (137kB)
Collecting certifi>=2017.4.17 (from requests<3.0,>=2.18->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl (147kB)
Collecting chardet<5,>=3.0.2 (from requests<3.0,>=2.18->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl (178kB)
Collecting idna<3,>=2.5 (from requests<3.0,>=2.18->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting six<2,>=1.9.0 (from virtualenv<21.0.0,>=20.0.26->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting distlib<1,>=0.3.1 (from virtualenv<21.0.0,>=20.0.26->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/f5/0a/490fa011d699bb5a5f3a0cf57de82237f52a6db9d40f33c53b2736c9a1f9/distlib-0.3.1-py2.py3-none-any.whl (335kB)
Collecting appdirs<2,>=1.4.3 (from virtualenv<21.0.0,>=20.0.26->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl
Collecting filelock<4,>=3.0.0 (from virtualenv<21.0.0,>=20.0.26->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/93/83/71a2ee6158bb9f39a90c0dea1637f81d5eef866e188e1971a1b1ab01a35a/filelock-3.0.12-py3-none-any.whl
Collecting webencodings (from html5lib<2.0,>=1.0->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Collecting jeepney>=0.4.2; sys_platform == "linux" (from keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/51/b0/a6ea72741aaac3f37fb96d195e4ee576a103c4c04e279bc6b446a70960e1/jeepney-0.6.0-py3-none-any.whl (45kB)
Collecting SecretStorage>=3.2; sys_platform == "linux" (from keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/63/a2/a6d9099b14eb5dbbb04fb722d2b5322688f8f99b471bdf2097e33efa8091/SecretStorage-3.3.0-py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect<5.0.0,>=4.7.0->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl
Collecting msgpack>=0.5.2 (from cachecontrol[filecache]<0.13.0,>=0.12.4->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/59/04/87fc6708659c2ed3b0b6d4954f270b6e931def707b227c4554f99bd5401e/msgpack-1.0.2.tar.gz (123kB)
Collecting lockfile>=0.9; extra == "filecache" (from cachecontrol[filecache]<0.13.0,>=0.12.4->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/c8/22/9460e311f340cb62d26a38c419b1381b8593b0bb6b5d1f056938b086d362/lockfile-0.12.2-py2.py3-none-any.whl
Collecting cryptography>=2.0 (from SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Downloading https://files.pythonhosted.org/packages/06/ed/cb79cc94ec58d9d92557238fc6c629cd6e07d72334d2de556aecc2211370/cryptography-3.4.1.tar.gz (544kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting cffi>=1.12 (from cryptography>=2.0->SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Collecting setuptools-rust>=0.11.4 (from cryptography>=2.0->SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/e5/e3/ede8b8545e7ce7f5fde88d1a89cdfffa281ab3b93815c3c1a464ca3b6855/setuptools_rust-0.11.6-py3-none-any.whl
Collecting pycparser (from cffi>=1.12->cryptography>=2.0->SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
Collecting semantic-version>=2.6.0 (from setuptools-rust>=0.11.4->cryptography>=2.0->SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/a5/15/00ef3b7888a10363b7c402350eda3acf395ff05bebae312d1296e528516a/semantic_version-2.8.5-py2.py3-none-any.whl
Collecting toml>=0.9.0 (from setuptools-rust>=0.11.4->cryptography>=2.0->SecretStorage>=3.2; sys_platform == "linux"->keyring<22.0.0,>=21.2.0; python_version >= "3.6" and python_version < "4.0"->poetry>=1.0.0)
Using cached https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl
Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517): started
Building wheel for cryptography (PEP 517): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpl32at1hl
cwd: /tmp/pip-install-z_02icga/cryptography
Complete output (145 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-x86_64-3.8/cryptography
copying src/cryptography/__about__.py -> build/lib.linux-x86_64-3.8/cryptography
copying src/cryptography/__init__.py -> build/lib.linux-x86_64-3.8/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-x86_64-3.8/cryptography
copying src/cryptography/utils.py -> build/lib.linux-x86_64-3.8/cryptography
creating build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-x86_64-3.8/cryptography/x509
creating build/lib.linux-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/_types.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/_der.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
copying src/cryptography/hazmat/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/interfaces.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/encode_asn1.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ocsp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/backends/openssl
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/kdf
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/serialization
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/utils.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/primitives/twofactor
creating build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/__init__.py -> build/lib.linux-x86_64-3.8/cryptography/hazmat/bindings/openssl
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '*' found under directory 'vectors'
warning: no previously-included files matching '*' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.zuul.d'
warning: no previously-included files matching '*' found under directory '.zuul.playbooks'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.8/_padding.c'
creating build/temp.linux-x86_64-3.8
generating cffi module 'build/temp.linux-x86_64-3.8/_openssl.c'
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed.
=============================DEBUG ASSISTANCE=============================
error: Can not find Rust compiler
----------------------------------------
ERROR: Failed building wheel for cryptography
Running setup.py clean for cryptography
Failed to build cryptography
Building wheels for collected packages: msgpack
Building wheel for msgpack (setup.py): started
Building wheel for msgpack (setup.py): finished with status 'done'
Created wheel for msgpack: filename=msgpack-1.0.2-cp38-cp38-linux_x86_64.whl size=15818 sha256=38a45e764bcc3969e391765dd00b252d9660efeffb0b866dc92e606af7e3e0ce
Stored in directory: /root/.cache/pip/wheels/7d/dc/1b/5704e2eb1e71a43b92fa64d0ba9bca6f73e5739662b1d3e034
Successfully built msgpack
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 19.2.3, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-ydp2mpgs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'poetry>=1.0.0' Check the logs for full command output.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 20
- Comments: 29 (10 by maintainers)
Commits related to this issue
- Pin cryptography version The build is breaking on CircleCI due to the cryptography library, one of the solutions is to pin the version (to something less that ~3.3): https://github.com/python-poetry... — committed to Iridescent-CM/curiosity-machine by shaun-technovation 3 years ago
- Pin cryptography version The build is breaking on CircleCI due to the cryptography library, one of the solutions is to pin the version: https://github.com/python-poetry/poetry/issues/3661 Refs: #24... — committed to Iridescent-CM/curiosity-machine by shaun-technovation 3 years ago
I simply installed the rust compiler and got past this error.
I’m on Mac OS, but you could translate it to your package manager of choice anyways:
After that open a new terminal to install the compiler itself:
IMO it kind of is a poetry problem, in that I’m not expecting
poetry install
to install new versions of anything if I haven’t updated packages in mypoetry.lock
. I don’t have a good understanding of why poetry installs poetry in the project virtualenv, but the result seems like an unexpected breakdown of version pinning.I don’t depend directly on cryptography, and it doesn’t appear in my lock file. How do I know to pin it until a breaking change like this comes along?
My point is that there are accidental build dependencies that I’m not aware of and that I don’t know aren’t already pinned. That by itself seems not great, and counter to the way that I don’t have to think about individually pinning any other dependency; poetry just takes care of it for me.
It’s also worth noting that, to my best recollection, I didn’t upgrade poetry itself, and yet it pulled in this new version of cryptography during
poetry install
anyway.pip install 'cryptography<=3'
resolved it for me@finswimmer Regarding
it is a little bit more nuanced. It is not because poetry is trying to install cryptography, but because pip is trying to install poetry. See the first traceback in the initial comment. This is due to the fact that an old
build-system
entry exists inpyproject.toml
which requirespoetry
instead ofpoetry-core
. So one can have this error even thoughcryptography
is not used or by installing any sdist from PyPI which has apyproject.toml
that indicates that it requirespoetry
. Then pip will (for isolated builds, ie pep-517/518) install poetry which in turn pulls in cryptography.Edit:// One can also have the problem if they include cryptography in their package, but I do not think that this is what the issue indicates (according to the traceback). But either way it is not really something poetry can fix.
In our environment we are seeing this when installing poetry via the cheese shop on Alpine 3.10. Here is a minimally reproducible example using docker:
apk add rust
doesn’t resolve this unless you are at alpine > 3.13. In my environment we have solved this by pinning the version of cryptography to < 3.0 with pip before installing poetry.Hello,
it seems to me, that different questions are raised and mixed here together. Let’s try to order them:
Why you cannot install successfully the cryptography package?
poetry decided to download the
sdist
package ofcryptography
.sdists
packages needs to be build intowheels
before installing. Becausecryptography
is not a python file only package there is some work to do.alpine is minimal distribution with the focus on security. So it often lacks packages which are included in other distribution by default and you have install those packages by yourself. In case of
cryptography
they have a install instruction on their site.Why poetry chooses the sdist and not a wheel?
wheels
with amanylinux
tag, doesn’t work on alpine. So thewheel
must be build from thesdist
.I don’t have
cryptography
in my dependencies. Why is poetry trying to install it?Run a
poetry show --tree
on your project and search forcryptography
to find out where it comes from.If you publish the
poetry.lock
together withpyproject.toml
the dependencies are pinned there. Of course only until you add or remove a package. Then the dependency tree must be resolved again and versions might change. I have in mind that someone wrote a script to write the locked versions of direct dependencies into thepyproject.toml
. But I can’t remember how it was called 🤔Hope I could clarify some things.
fin swimmer
Please double check you pyproject.toml against my comment (you should have poetry-core as buildsystem). If not you will need to fix that. Bit no matter what this is not a poetry bug. Fix your system so you are able to install cryptography
On Sat, Mar 27, 2021, at 23:17, Conor Sheehan wrote:
Btw probably not a full fix, but can you do the following in your pyproject.toml?
This is what poetry nowadays generates. Previously it had something like:
This means that to build/install such a package it would require poetry to be installed. Which the new variant it is just poetry-core.