mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
Revert "meson: don't set postPatch at all if not using PyPy"
This reverts commit ef3d7e646a.
This commit is contained in:
@@ -70,18 +70,22 @@ python3.pkgs.buildPythonApplication (finalAttrs: {
|
||||
./007-freebsd-pkgconfig-path.patch
|
||||
];
|
||||
|
||||
${if python3.isPyPy then "postPatch" else null} = ''
|
||||
substituteInPlace mesonbuild/modules/python.py \
|
||||
--replace-fail "PythonExternalProgram('python3', mesonlib.python_command" \
|
||||
"PythonExternalProgram('${python3.meta.mainProgram}', mesonlib.python_command"
|
||||
substituteInPlace mesonbuild/modules/python3.py \
|
||||
--replace-fail "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, 'python3'" \
|
||||
"state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, '${python3.meta.mainProgram}'"
|
||||
substituteInPlace "test cases"/*/*/*.py "test cases"/*/*/*/*.py \
|
||||
--replace-quiet '#!/usr/bin/env python3' '#!/usr/bin/env pypy3' \
|
||||
--replace-quiet '#! /usr/bin/env python3' '#!/usr/bin/env pypy3'
|
||||
chmod +x "test cases"/*/*/*.py "test cases"/*/*/*/*.py
|
||||
'';
|
||||
postPatch =
|
||||
if python3.isPyPy then
|
||||
''
|
||||
substituteInPlace mesonbuild/modules/python.py \
|
||||
--replace-fail "PythonExternalProgram('python3', mesonlib.python_command" \
|
||||
"PythonExternalProgram('${python3.meta.mainProgram}', mesonlib.python_command"
|
||||
substituteInPlace mesonbuild/modules/python3.py \
|
||||
--replace-fail "state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, 'python3'" \
|
||||
"state.environment.lookup_binary_entry(mesonlib.MachineChoice.HOST, '${python3.meta.mainProgram}'"
|
||||
substituteInPlace "test cases"/*/*/*.py "test cases"/*/*/*/*.py \
|
||||
--replace-quiet '#!/usr/bin/env python3' '#!/usr/bin/env pypy3' \
|
||||
--replace-quiet '#! /usr/bin/env python3' '#!/usr/bin/env pypy3'
|
||||
chmod +x "test cases"/*/*/*.py "test cases"/*/*/*/*.py
|
||||
''
|
||||
else
|
||||
null;
|
||||
|
||||
build-system = [ python3.pkgs.setuptools ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user