Skip to content

Commit

Permalink
Add --scie-only & --scie-name-style. (#2523)
Browse files Browse the repository at this point in the history
These options allow the files output when using `--scie {eager,lazy}`
scies to be better controlled. The `--scie-only` option provides a way
to ensure no PEX file is output, just the resulting scie. The
`--scie-name-style` option allows control over how the scie's target
platform is incorporated in the scie file name.
  • Loading branch information
jsirois authored Sep 12, 2024
1 parent c8a4975 commit d8a60db
Show file tree
Hide file tree
Showing 29 changed files with 5,167 additions and 70 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
- name: Check Packaging
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: package -- --additional-format sdist --additional-format wheel --embed-docs --clean-docs
tox-env: >-
package -- --additional-format sdist --additional-format wheel --embed-docs --clean-docs
--scies --gen-md-table-of-hash-and-size dist/hashes.md
- name: Check Docs
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Package Pex ${{ needs.determine-tag.outputs.release-tag }} PEX
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: package -- --embed-docs
tox-env: package -- --embed-docs --scies --gen-md-table-of-hash-and-size dist/hashes.md
- name: Generate Pex ${{ needs.determine-tag.outputs.release-tag }} PDF
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
Expand All @@ -97,14 +97,20 @@ jobs:
uses: actions/attest-build-provenance@v1
with:
subject-path: |
dist/pex
dist/pex*
dist/docs/pdf/pex.pdf
- name: Prepare Changelog
id: prepare-changelog
uses: a-scie/actions/[email protected]
with:
changelog-file: ${{ github.workspace }}/CHANGES.md
version: ${{ needs.determine-tag.outputs.release-version }}
- name: Append Hashes to Changelog
run: |
changelog_tmp="$(mktemp)"
cat "${{ steps.prepare-changelog.outputs.changelog-file }}" <(echo '***') dist/hashes.md \
> "${changelog_tmp}"
mv "${changelog_tmp}" "${{ steps.prepare-changelog.outputs.changelog-file }}"
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release
uses: softprops/action-gh-release@v2
with:
Expand All @@ -114,7 +120,7 @@ jobs:
draft: false
prerelease: false
files: |
dist/pex
dist/pex*
dist/docs/pdf/pex.pdf
fail_on_unmatched_files: true
discussion_category_name: Announcements
Expand Down
36 changes: 36 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Release Notes

## 2.18.0

This release adds support for `pex3 cache {dir,info,purge}` for
inspecting and managing the Pex cache. Notably, the `pex3 cache purge`
command is safe in the face of concurrent PEX runs, waiting for in
flight PEX runs to complete and blocking new runs from starting once the
purge is in progress. N.B.: when using `pex3 cache purge` it is best to
install Pex with the 'management' extra; e.g.:
`pip install pex[management]`. Alternatively, one of the new Pex scie
binary releases can be used.

In order to release a Pex binary that can support the new `pex3` cache
management commands first class, a set of enhancements to project
locking and scie generation were added. When using `--project` you can
now specify extras; e.g.: `--project ./the/project-dir[extra1,extra2]`.
When creating a Pex scie, you can now better control the output files
using `--scie-only` to ensure no PEX file is emitted and
`--scie-name-style` to control how the scie target platform name is
mixed into the scie output file name. Additionally, you can request one
or more shasum-compatible checksum files be emitted for each scie with
`--scie-hash-alg`.

On the locking front, an obscure bug locking project releases that
contain artifacts that mis-report their version number via their file
name has been fixed.

Finally, the vendored Pip has had its own vendored CA cert bundle
upgraded from that in certifi 2024.7.4 to that in certifi 2024.8.30.

* Fix locking of sdists rejected by Pip. (#2524)
* Add `--scie-only` & `--scie-name-style`. (#2523)
* Support `--project` extras. (#2522)
* Support shasum file gen via `--scie-hash-alg`. (#2520)
* Update vendored Pip's CA cert bundle. (#2517)
* Introduce `pex3 cache {dir,info,purge}`. (#2513)

## 2.17.0

This release brings support for overriding the versions of setuptools
Expand Down
2 changes: 1 addition & 1 deletion build-backend/pex_build/hatchling/build_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(
subprocess.check_call(
args=[
sys.executable,
os.path.join(self.root, "scripts", "build_docs.py"),
os.path.join(self.root, "scripts", "build-docs.py"),
"--clean-html",
out_dir,
]
Expand Down
2 changes: 2 additions & 0 deletions package/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2024 Pex project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
Loading

0 comments on commit d8a60db

Please sign in to comment.