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
@@ -37,13 +37,15 @@ class TestBeforeTest(TestCase):
|
||||
def test(tmp_path):
|
||||
project_dir = tmp_path / 'project'
|
||||
before_test_project.generate(project_dir)
|
||||
test_project_dir = project_dir / 'dependency'
|
||||
test_projects.new_c_project().generate(test_project_dir)
|
||||
|
||||
# build the wheels
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
|
||||
# write python version information to a temporary file, this is
|
||||
# checked in setup.py
|
||||
'CIBW_BEFORE_TEST': '''python -c "import sys; open('/tmp/pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('/tmp/pythonprefix.txt', 'w').write(sys.prefix)"''',
|
||||
'CIBW_BEFORE_TEST_WINDOWS': '''python -c "import sys; open('c:\\pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('c:\\pythonprefix.txt', 'w').write(sys.prefix)"''',
|
||||
'CIBW_BEFORE_TEST': '''python -c "import sys; open('/tmp/pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('/tmp/pythonprefix.txt', 'w').write(sys.prefix)" && python -m pip install {project}/dependency''',
|
||||
'CIBW_BEFORE_TEST_WINDOWS': '''python -c "import sys; open('c:\\pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('c:\\pythonprefix.txt', 'w').write(sys.prefix)" && python -m pip install {project}/dependency''',
|
||||
'CIBW_TEST_REQUIRES': 'nose',
|
||||
# the 'false ||' bit is to ensure this command runs in a shell on
|
||||
# mac/linux.
|
||||
|
||||
@@ -64,6 +64,10 @@ class TestSpam(TestCase):
|
||||
bits = struct.calcsize("P") * 8
|
||||
if bits == 32:
|
||||
self.assertEqual(platform.machine(), "i686")
|
||||
|
||||
def test_time_to_remove_the_pypy_venv_patch(self):
|
||||
if sys.platform == "darwin":
|
||||
assert not hasattr(sys, "pypy_version_info") or sys.pypy_version_info < (7,3,4)
|
||||
'''
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user