(shared_integration_test_tmpdir)
| 38 | |
| 39 | @pytest.fixture |
| 40 | def statically_linked_musl_libc_cpython(shared_integration_test_tmpdir): |
| 41 | # type: (str) -> str |
| 42 | pbs_distribution_url = ( |
| 43 | "https://github.com/astral-sh/python-build-standalone/releases/download/20221220/" |
| 44 | "cpython-3.10.9+20221220-x86_64_v3-unknown-linux-musl-install_only.tar.gz" |
| 45 | ) |
| 46 | tarball_name = os.path.basename(urlparse.urlparse(pbs_distribution_url).path) |
| 47 | pbs_distribution = os.path.join(shared_integration_test_tmpdir, "PBS-dists", tarball_name) |
| 48 | with atomic_directory(pbs_distribution) as chroot: |
| 49 | if not chroot.is_finalized(): |
| 50 | tarball_dest = os.path.join(chroot.work_dir, tarball_name) |
| 51 | with URLFetcher().get_body_stream(pbs_distribution_url) as read_fp, open( |
| 52 | tarball_dest, "wb" |
| 53 | ) as write_fp: |
| 54 | shutil.copyfileobj(read_fp, write_fp) |
| 55 | with tarfile.open(tarball_dest) as tf: |
| 56 | tf.extractall(chroot.work_dir) |
| 57 | statically_linked_musl_libc_cpython = os.path.join( |
| 58 | chroot.work_dir, "python", "bin", "python3" |
| 59 | ) |
| 60 | assert is_exe(statically_linked_musl_libc_cpython) |
| 61 | |
| 62 | return os.path.join(pbs_distribution, "python", "bin", "python3") |
| 63 | |
| 64 | |
| 65 | @pytest.mark.skipif( |
nothing calls this directly
no test coverage detected