summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython/default.nix
diff options
context:
space:
mode:
authorIvan Babrou <github@ivan.computer>2021-02-26 21:03:53 -0800
committerIvan Babrou <github@ivan.computer>2021-03-03 16:02:07 -0800
commitb00c7c2d1d905eb63c81a0917f1a94b763a7843b (patch)
tree23077e05bb2c43fec8be19fc552e34bac8d8a42e /pkgs/development/interpreters/python/cpython/default.nix
parent8b8480483710b2be5161a0d6329499342ab51c82 (diff)
downloadnixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar.gz
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar.bz2
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar.lz
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar.xz
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.tar.zst
nixpkgs-b00c7c2d1d905eb63c81a0917f1a94b763a7843b.zip
python37, python2: remove win64 workaround to fix aarch64-darwin
The issue manifests itself as the following on `aarch64-darwin`:

```
>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/i8cq0xrjirz1rcp65wzcyhj6ypzlw9il-python3-3.7.10/lib/python3.7/ctypes/__init__.py", line 551, in <module>
    _reset_cache()
  File "/nix/store/i8cq0xrjirz1rcp65wzcyhj6ypzlw9il-python3-3.7.10/lib/python3.7/ctypes/__init__.py", line 273, in _reset_cache
    CFUNCTYPE(c_int)(lambda: None)
MemoryError
```

The commit we backport is included in Python 3.8, and it reverts
the change that was introduced all the way back in Python 2.7.
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/default.nix')
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 1ae8d19ac58..fdf022213c5 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -185,6 +185,11 @@ in with passthru; stdenv.mkDerivation {
     # Backport a fix for discovering `rpmbuild` command when doing `python setup.py bdist_rpm` to 3.5, 3.6, 3.7.
     # See: https://bugs.python.org/issue11122
     ./3.7/fix-hardcoded-path-checking-for-rpmbuild.patch
+    # The workaround is for unittests on Win64, which we don't support.
+    # It does break aarch64-darwin, which we do support. See:
+    # * https://bugs.python.org/issue35523
+    # * https://github.com/python/cpython/commit/e6b247c8e524
+    ./3.7/no-win64-workaround.patch
   ] ++ optionals (isPy37 || isPy38 || isPy39) [
     # Fix darwin build https://bugs.python.org/issue34027
     ./3.7/darwin-libutil.patch