summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/py-cryptography/package.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-cryptography/package.py b/var/spack/repos/builtin/packages/py-cryptography/package.py
index 5f70eac778..e4521cf769 100644
--- a/var/spack/repos/builtin/packages/py-cryptography/package.py
+++ b/var/spack/repos/builtin/packages/py-cryptography/package.py
@@ -47,3 +47,13 @@ class PyCryptography(PythonPackage):
depends_on('py-ipaddress', type=('build', 'run'), when='^python@:3.3')
depends_on('openssl@:1.0', when='@:1.8.1')
depends_on('openssl')
+
+ # To fix https://github.com/spack/spack/issues/29669
+ # https://community.home-assistant.io/t/error-failed-building-wheel-for-cryptography/352020/14
+ # We use CLI git instead of Cargo's internal git library
+ # See reference: https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
+ depends_on('git', type='build', when='@35:')
+
+ def setup_build_environment(self, env):
+ if self.spec.satisfies('@35:'):
+ env.set('CARGO_NET_GIT_FETCH_WITH_CLI', 'true')