Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 909 Bytes

create_python_package.md

File metadata and controls

24 lines (16 loc) · 909 Bytes

Instructions for uploading a Python package

References

Install Twine if not already installed, which upload your project to PyPI

  • pip install twine

Make sure we have properly prepared the package first ie. we need the following files properly prepared

  • setup.py

If we are uploading a new version, make sure to change the version number in setup.py

Be careful to remove dist folder (otherwise later will try to re-upload old files)

Now create a distribution package

  • python setup.py sdist bdist_wheel

For PyPI test environment upload (strongly recommend doing this first, in case you make a mistake)

For PyPI prod environment upload

  • python -m twine upload dist/*