Skip to content

Commit 29855de

Browse files
committed
ci: stop creating install_only distributions
The previous commit added the install_only tar.gz archive generation to the Rust-based artifact download process. The old CI code for producing artifacts is no longer needed so this commit deletes it and the supporting Python code.
1 parent 2c708d2 commit 29855de

File tree

5 files changed

+0
-190
lines changed

5 files changed

+0
-190
lines changed

.github/workflows/apple.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -265,38 +265,3 @@ jobs:
265265
with:
266266
name: ${{ matrix.build.py }}-${{ matrix.build.target_triple }}
267267
path: dist/*
268-
269-
install-only:
270-
strategy:
271-
fail-fast: false
272-
matrix:
273-
version:
274-
- '3.9'
275-
- '3.10'
276-
needs:
277-
- build
278-
runs-on: 'ubuntu-20.04'
279-
steps:
280-
- uses: actions/checkout@v2
281-
with:
282-
fetch-depth: 0
283-
284-
- name: Install Python
285-
uses: actions/setup-python@v2
286-
with:
287-
python-version: '3.9'
288-
289-
- name: Download Python
290-
uses: actions/download-artifact@v2
291-
with:
292-
name: 'cpython-${{ matrix.version }}-x86_64-apple-darwin'
293-
294-
- name: Repack Distribution
295-
run: |
296-
./prune-distribution.py cpython-*-pgo+lto-*
297-
298-
- name: Upload Distribution
299-
uses: actions/upload-artifact@v2
300-
with:
301-
name: 'cpython-${{ matrix.version }}-install-only'
302-
path: cpython-*.tar.gz

.github/workflows/linux.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -539,38 +539,3 @@ jobs:
539539
with:
540540
name: ${{ matrix.build.py }}-${{ matrix.build.target_triple }}
541541
path: dist/*
542-
543-
install-only:
544-
strategy:
545-
fail-fast: false
546-
matrix:
547-
version:
548-
- '3.9'
549-
- '3.10'
550-
needs:
551-
- build
552-
runs-on: 'ubuntu-20.04'
553-
steps:
554-
- uses: actions/checkout@v2
555-
with:
556-
fetch-depth: 0
557-
558-
- name: Install Python
559-
uses: actions/setup-python@v2
560-
with:
561-
python-version: '3.9'
562-
563-
- name: Download Python
564-
uses: actions/download-artifact@v2
565-
with:
566-
name: 'cpython-${{ matrix.version }}-x86_64-unknown-linux-gnu'
567-
568-
- name: Repack Distribution
569-
run: |
570-
./prune-distribution.py cpython-*-pgo+lto-*
571-
572-
- name: Upload Distribution
573-
uses: actions/upload-artifact@v2
574-
with:
575-
name: 'cpython-${{ matrix.version }}-install-only'
576-
path: cpython-*.tar.gz

.github/workflows/windows.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -93,38 +93,3 @@ jobs:
9393
with:
9494
name: ${{ matrix.py }}-${{ matrix.vcvars }}
9595
path: dist/*
96-
97-
install-only:
98-
strategy:
99-
fail-fast: false
100-
matrix:
101-
version:
102-
- '3.9'
103-
- '3.10'
104-
needs:
105-
- build
106-
runs-on: 'ubuntu-20.04'
107-
steps:
108-
- uses: actions/checkout@v2
109-
with:
110-
fetch-depth: 0
111-
112-
- name: Install Python
113-
uses: actions/setup-python@v2
114-
with:
115-
python-version: '3.9'
116-
117-
- name: Download Python
118-
uses: actions/download-artifact@v2
119-
with:
120-
name: 'cpython-${{ matrix.version }}-vcvars64.bat'
121-
122-
- name: Repack Distribution
123-
run: |
124-
./prune-distribution.py cpython-*-pgo-*
125-
126-
- name: Upload Distribution
127-
uses: actions/upload-artifact@v2
128-
with:
129-
name: 'cpython-install-only-${{ matrix.version }}'
130-
path: cpython-*.tar.gz

prune-distribution.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

pythonbuild/utils.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -398,40 +398,6 @@ def compress_python_archive(
398398
return dest_path
399399

400400

401-
def prune_distribution_archive(source_path: pathlib.Path):
402-
"""Prunes a full Python distribution archive into one with just a Python install."""
403-
name_parts = source_path.name.split("-")
404-
name_parts[-2] = "install_only"
405-
406-
dest_path = source_path.with_name("-".join(name_parts)).with_suffix(".gz")
407-
408-
with source_path.open("rb") as ifh, tarfile.open(dest_path, "w:gz") as otf:
409-
dctx = zstandard.ZstdDecompressor()
410-
with dctx.stream_reader(ifh) as tar_reader:
411-
with tarfile.open(fileobj=tar_reader, mode="r|") as itf:
412-
for member in itf:
413-
if not member.name.startswith("python/install/"):
414-
continue
415-
416-
member.name = "python/%s" % member.name[len("python/install/") :]
417-
418-
if member.pax_headers.get("path"):
419-
member.pax_headers["path"] = (
420-
"python/%s"
421-
% member.pax_headers["path"][len("python/install/") :]
422-
)
423-
424-
if member.issym():
425-
data = None
426-
else:
427-
data = itf.extractfile(member)
428-
429-
print("adding %s" % member.name)
430-
otf.addfile(member, data)
431-
432-
print("wrote %s" % dest_path)
433-
434-
435401
def add_licenses_to_extension_entry(entry):
436402
"""Add licenses keys to a ``extensions`` entry for JSON distribution info."""
437403

0 commit comments

Comments
 (0)