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

setup a workflow for publishing package to pypi #11804

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

jzhang533
Copy link
Collaborator

@jzhang533 jzhang533 commented Mar 26, 2024

this is cherry-pick of recent commits: c306d28 8a99bc9 d28d9e7 89e0a15 landed in release/2.7 branch. In the future, when we create a release, we can use .github/workflows/python-publish.yml to publish package automatically to pypi.

Some thing we can improve:

  • use a pyproject.toml file in this project, which is the recommended way for python packaging, see details here: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/. By doing so, we can use python -m build to build and package this project, which is more modern way for python packaging.

  • dynamic versioning, get version of this package by using paddleocr.VERSION requires complex env setup (see paddleocr.py), we may need a better mechanism for doing this. To avoid changing paddleocr.py, a trick is used in setup.py.

P.S.: to use github action for pypi package uploading, a repository secret is installed. (https://github.com/PaddlePaddle/PaddleOCR/settings/secrets/actions, repository admin privilege is required).

Copy link

paddle-bot bot commented Mar 26, 2024

Thanks for your contribution!

@luotao1 luotao1 merged commit 5e40f85 into PaddlePaddle:dygraph Mar 27, 2024
2 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants