fix: patching pypy venv (#502)
Potentially revert / remove on release of PyPy 7.3.4. * patching linux and macos * try test * add patch files for pypy2.7 * fix installing * Combine patch files into one * Simplify further, and add test to remind ourselves to remove the PyPy patch * ignore fail of patch on linux make new test failing only on linux * fix test * add timeout * fix patch on linux * change `-N` to `--force` Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
This commit is contained in:
co-authored by
Yannick Jadoul
parent
1029a1a123
commit
99203a83f9
@@ -138,6 +138,16 @@ def build(options: BuildOptions) -> None:
|
||||
log.build_start(config.identifier)
|
||||
|
||||
dependency_constraint_flags: List[Union[str, PathLike]] = []
|
||||
if config.identifier.startswith("pp"):
|
||||
# Patch PyPy to make sure headers get installed into a venv
|
||||
patch_version = '_27' if config.version == '2.7' else ''
|
||||
patch_path = Path(__file__).absolute().parent / 'resources' / f'pypy_venv{patch_version}.patch'
|
||||
patch_docker_path = PurePath('/pypy_venv.patch')
|
||||
docker.copy_into(patch_path, patch_docker_path)
|
||||
try:
|
||||
docker.call(['patch', '--force', '-p1', '-d', config.path, '-i', patch_docker_path])
|
||||
except subprocess.CalledProcessError:
|
||||
print("PyPy patch not applied", file=sys.stderr)
|
||||
|
||||
if options.dependency_constraints:
|
||||
constraints_file = options.dependency_constraints.get_for_python_version(config.version)
|
||||
|
||||
Reference in New Issue
Block a user