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

Improve build and automate push to PyPI #236

Merged
merged 7 commits into from
Feb 25, 2025
Merged

Improve build and automate push to PyPI #236

merged 7 commits into from
Feb 25, 2025

Conversation

millerdev
Copy link
Contributor

@millerdev millerdev commented Feb 21, 2025

The version number has been bumped to 2.3.0. A dev version will be pushed to PyPI when this PR is merged, and the final production version of 2.3.0 will be pushed when a new tag is pushed with the value v2.3.0.

🐡 Review by commit.

Process for testing build and publish to PyPI

Update pypi.org as necessary to allow publish from Github Actions.

Temporarily rename/overwrite a workflow that exists on the master branch. The gh workflow run command cannot run workflows that do not exist on the primary branch.

git mv `.github/workflows/{pypi,tests}.yml
git commit -m "DO NOT MERGE temporary commit for testing pypi.yml"
git push && gh workflow run tests.yml --ref dm/auto-pypi

Adjust tests.yml as necessary, push changes, and repeat the last command until successful publish is achieved. Then rebase and update pypi.yml with the final good version of the temporary tests.yml.

Based on SO answer.

setup.py is still needed for the cython build until tool.setuptools.ext.ext-modules is no longer experimental.
pyproject.toml is the source of truth for supported Python versions. No other files need to be kept in sync.
This is a workaround for the fact that https://test.pypi.org/p/jsonobject
has been claimed by another project. Dev releases will not be downloaded
by pip unless the `--pre` argument is used, and the latest stable release
will be displayed on https://pypi.org/p/jsonobject by default.
@millerdev millerdev marked this pull request as ready for review February 24, 2025 17:25
@gherceg
Copy link
Contributor

gherceg commented Feb 25, 2025

Oh just noticed the "This branch had an error being deployed" message. Seems like resolving that before merging is correct?

@millerdev
Copy link
Contributor Author

I think that error was a result of earlier PyPI publication testing in Github Actions, which should be resolved with the force push of d498e56. Notice that it says both are outdated:

1 failed (outdated) and 1 active (outdated) deployments

I'm going to merge and see if the dev release successfully makes it to PyPI. If not, I'll fix the issue before pushing a final version tag.

@millerdev millerdev merged commit 6efd4dc into master Feb 25, 2025
6 checks passed
@millerdev
Copy link
Contributor Author

Forgot to mention in the description that a major change introduced by this PR is that Linux wheels are built and published to PyPI for all sported Python versions. These are "manylinux" wheels built using cibuildwheel.

Previously (in practice) only a single wheel was built/published using whatever version of Python was installed by the person doing the publishing.

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.

2 participants