diff options
author | Simon Kohlmeyer <simon.kohlmeyer@gmail.com> | 2022-10-27 17:14:18 +0200 |
---|---|---|
committer | Simon Kohlmeyer <simon.kohlmeyer@gmail.com> | 2022-10-28 15:56:47 +0200 |
commit | 8ff2a80445e05743e252acd5a223452230757617 (patch) | |
tree | f0b57464896b4ce35bcdb0d47b4850664a0e7701 /pkgs/development/python-modules/cffi | |
parent | 2001e2b31c565bcdf7bc13062b8d7cfccaca05b8 (diff) |
python311Packages.cffi: patch failing test
This seems like an upstream issue with the final release of python3.11. Sadly, their gitlab is down right now, but I will pass the patch upstream as soon as I can.
Diffstat (limited to 'pkgs/development/python-modules/cffi')
-rw-r--r-- | pkgs/development/python-modules/cffi/default.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 66b315f14ab0c..52b9ab08fc4dd 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, pytestCheckHook, - libffi, pkg-config, pycparser + libffi, pkg-config, pycparser, python, fetchpatch }: if isPyPy then null else buildPythonPackage rec { @@ -17,6 +17,17 @@ if isPyPy then null else buildPythonPackage rec { propagatedBuildInputs = [ pycparser ]; + patches = + # Fix test that failed because python seems to have changed the exception format in the + # final release. This patch should be included in the next version and can be removed when + # it is released. + lib.optionals (python.pythonVersion == "3.11") [ + (fetchpatch { + url = "https://foss.heptapod.net/pypy/cffi/-/commit/8a3c2c816d789639b49d3ae867213393ed7abdff.diff"; + sha256 = "sha256-3wpZeBqN4D8IP+47QDGK7qh/9Z0Ag4lAe+H0R5xCb1E="; + }) + ]; + postPatch = lib.optionalString stdenv.isDarwin '' # Remove setup.py impurities substituteInPlace setup.py \ |