From 8decd6f65db3f119a2a495bdc0d9cca2fdab6c7b Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 14 Nov 2021 18:19:31 +0100 Subject: [PATCH] fix: clean before build in test_manylinux pip is now building in-place leaving some files around which make some tests to fail when building a second time for musllinux. --- tests/integration/test_manylinux.py | 33 +++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/tests/integration/test_manylinux.py b/tests/integration/test_manylinux.py index 0ac68a0d..72b4a46b 100644 --- a/tests/integration/test_manylinux.py +++ b/tests/integration/test_manylinux.py @@ -314,6 +314,7 @@ def test_build_wheel_with_binary_executable( "bash", "-c", "cd /auditwheel_src/tests/integration/testpackage && " + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " "python -m pip wheel --no-deps -w /io .", ], ) @@ -393,9 +394,9 @@ def test_build_wheel_depending_on_library_with_rpath( "bash", "-c", ( - "cd /auditwheel_src/tests/integration/testrpath " - "&& rm -rf build " - f"&& DTAG={dtag} python setup.py bdist_wheel -d /io" + "cd /auditwheel_src/tests/integration/testrpath &&" + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " + f"DTAG={dtag} python setup.py bdist_wheel -d /io" ), ], ) @@ -477,9 +478,10 @@ def test_build_repair_multiple_top_level_modules_wheel( [ "bash", "-c", - "cd /auditwheel_src/tests/integration/multiple_top_level " - "&& make clean all " - "&& pip wheel . -w /io", + "cd /auditwheel_src/tests/integration/multiple_top_level && " + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " + "make clean all && " + "pip wheel . -w /io", ], ) @@ -545,10 +547,11 @@ def test_build_repair_wheel_with_internal_rpath( [ "bash", "-c", - "cd /auditwheel_src/tests/integration/internal_rpath " - "&& make clean all " - "&& mv lib-src/a/liba.so internal_rpath " - "&& pip wheel . -w /io", + "cd /auditwheel_src/tests/integration/internal_rpath && " + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " + "make clean all && " + "mv lib-src/a/liba.so internal_rpath && " + "pip wheel . -w /io", ], ) @@ -608,8 +611,9 @@ def test_strip_wheel(self, any_manylinux_container, docker_python, io_folder): [ "bash", "-c", - "cd /auditwheel_src/tests/integration/sample_extension " - "&& python -m pip wheel --no-deps -w /io .", + "cd /auditwheel_src/tests/integration/sample_extension && " + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " + "python -m pip wheel --no-deps -w /io .", ], ) @@ -644,8 +648,9 @@ def test_nonpy_rpath(self, any_manylinux_container, docker_python, io_folder): [ "bash", "-c", - "cd /auditwheel_src/tests/integration/nonpy_rpath " - "&& python -m pip wheel --no-deps -w /io .", + "cd /auditwheel_src/tests/integration/nonpy_rpath && " + "if [ -d ./build ]; then rm -rf ./build ./*.egg-info; fi && " + "python -m pip wheel --no-deps -w /io .", ], )