3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #198077 from voidus/master

python311Packages.cffi: patch failing test
This commit is contained in:
Jörg Thalheim 2022-12-01 23:13:19 +01:00 committed by GitHub
commit 80996a67b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 \