python39Packages.cffi: move prePatch to postPatch to not break patches

This commit is contained in:
Sandro Jäckel
2022-04-15 01:39:52 +02:00
committed by Martin Weinelt
parent d52b53fd9e
commit f0719291bc
@@ -19,11 +19,12 @@ if isPyPy then null else buildPythonPackage rec {
propagatedBuildInputs = [ pycparser ];
prePatch = lib.optionalString stdenv.isDarwin ''
postPatch = lib.optionalString stdenv.isDarwin ''
# Remove setup.py impurities
substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" ""
substituteInPlace setup.py --replace "'/usr/include/ffi'," ""
substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev libffi}/include'
substituteInPlace setup.py \
--replace "'-iwithsysroot/usr/include/ffi'" "" \
--replace "'/usr/include/ffi'," "" \
--replace '/usr/include/libffi' '${lib.getDev libffi}/include'
'';
# The tests use -Werror but with python3.6 clang detects some unreachable code.