Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ship a zipapp of pipx #895

Merged
merged 2 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,30 @@ jobs:
with:
user: __token__
password: ${{ secrets.pypi_password }}

build-zipapp:
name: Build zipapp
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [verify-docs, lint, tests]
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ env.default-python }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.default-python }}
- name: Upgrade pip, Install shiv
run: |
python -m pip install --upgrade pip
pip install shiv
- name: Build zipapp
run: shiv -c pipx -o ./pipx.pyz git+https://github.com/pypa/pipx@${{ github.ref_name }}
- name: Test zipapp
run: |
python ./pipx.pyz --version
python ./pipx.pyz install black
- name: Upload to releases
uses: softprops/action-gh-release@v1
with:
files: pipx.pyz
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
- Add `pipx uninject` command (#820)
- [docs] Fix `pipx run` examples and update Python versions used by `pipx install` examples
- [docs] Add an example for installation from source with extras
- Ship a [zipapp](https://docs.python.org/3/library/zipapp.html) of pipx

- Change the program name to `path/to/python -m pipx` when running as `python -m pipx`

Expand Down