-
Notifications
You must be signed in to change notification settings - Fork 71
How to deploy to PyPi
Kazuma Mikami edited this page Apr 17, 2021
·
4 revisions
https://packaging.python.org/tutorials/packaging-projects/
To create files to distribute, run the following command on the repository home directory:
rm -rf dist/ && poetry build && poetry run twine upload --repository-url https://test.pypi.org/legacy/ dist/*
To install the test package, you can run this:
pip install -i https://test.pypi.org/simple/ atcodertools=={version} --user
Trouble Shooting If you get some exception about dependency unsatisfaction, that's because test PyPI doesn't have the necessary dependencies. So, run the following command:
poetry export -f requirements.txt | pip install -r /dev/stdin
Deploy your package to the real PyPi after confirming your package works correctly with the test package:
poetry run twine upload dist/*