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

Fix PyPI deploy. #2364

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Feb 14, 2024

The v2.1.164 release went smoothly except for the PyPI deploy. I had to
build and deploy manually from the v2.1.164 tag with:

$ rm -rf dist/
$ tox -epackage -- \
--additional-format sdist \
--additional-format wheel \
--embed-docs
$ pex twine -c twine -- upload -s dist/*

The action wants the dist/ dir to just contain the artifacts to deploy;
no more and no less.

The v2.1.164 release went smoothly except for the PyPI deploy. I had to
build and deploy manually from the v2.1.164 tag with:
```
$ rm -rf dist/
$ tox -epackage -- \
--additional-format sdist \
--additional-format wheel \
--embed-docs
$ pex twine -c twine -- upload -s dist/*
```

The action wants the dist/ dir to just contain the artifacts to deploy;
no more and no less.
@jsirois jsirois requested review from zmanji, benjyw and huonw February 14, 2024 07:51
@jsirois jsirois requested a review from kaos February 14, 2024 14:53
Copy link
Collaborator

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why was this not an issue in the past? Is this related to the org switch, and how?

@jsirois
Copy link
Member Author

jsirois commented Feb 14, 2024

This is new due to the new --embed-docs, which causes html docs to be generated to dist/docs/html prior to building the wheel as part of the embedding machinery that enables pex3 docs for local offline docs.

So you now get:

dist/
    docs/
    pex-2.1.164.tar.gz
    pex-2.1.164-py2.py3-none-any.whl

And https://github.com/marketplace/actions/pypi-publish tries to publish everything in dist/ with no knobs to control inclusion or exclusion and publishing docs/ to PyPI fails as it should. The action realizes this as part of a pre-check it does though, failing the whole step with nothing being published. Thus the step I documented in the OP to right the ship for 2.1.164 worked (i.e.: thankfully that action is all or nothing).

@jsirois jsirois merged commit 0bd8bb9 into pex-tool:main Feb 14, 2024
26 checks passed
@jsirois jsirois deleted the pr/2362/follow-up/fix-pypi-deploy branch February 14, 2024 15:41
@jsirois jsirois mentioned this pull request Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants