Files
MINGW-packages/mingw-w64-python-cryptography/0002-move-setuptools-rust-import.patch
Jeremy Drake 2fcd0168e7 python-cryptography: fix _with_rust=no build
rust doesn't support aarch64-pc-windows-gnu (msys2/CLANG-packages#28)
and it apparently hardcodes libgcc (msys2/CLANG-packages#29), so disable
it in all clang prefixes
2021-02-15 20:17:00 -08:00

51 lines
1.7 KiB
Diff

--- cryptography-3.4.4/setup.py.orig 2021-02-15 20:10:23.508341000 -0800
+++ cryptography-3.4.4/setup.py 2021-02-15 20:11:12.508362500 -0800
@@ -10,22 +10,6 @@
from setuptools import find_packages, setup
-try:
- from setuptools_rust import RustExtension
-except ImportError:
- print(
- """
- =============================DEBUG ASSISTANCE==========================
- If you are seeing an error here please try the following to
- successfully install cryptography:
-
- 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
- =============================DEBUG ASSISTANCE==========================
- """
- )
- raise
-
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")
@@ -47,7 +31,24 @@
if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"):
rust_extensions = []
+ setup_requirements = setup_requirements[:-1]
else:
+ try:
+ from setuptools_rust import RustExtension
+ except ImportError:
+ print(
+ """
+ =============================DEBUG ASSISTANCE==========================
+ If you are seeing an error here please try the following to
+ successfully install cryptography:
+
+ 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
+ =============================DEBUG ASSISTANCE==========================
+ """
+ )
+ raise
+
rust_extensions = [
RustExtension(
"_rust",