Python publish your package

  • Directory/FIle

with open("README.md", "r", encoding="utf-8") as fh:
    long_description = fh.read()
setup(
...
    long_description=long_description,
...
)
    • README.md

    • LICENSE

    • packageFolder/classFile

      • __init__.py

from .classFile import classFile(className)
  • Install tools

    pip3.10 install setuptools wheel

    pip3.10 install twine

  • Build package

    python3.10 setup.py sdist bdist_wheel

  • Upload to testpypi (with name:”__token__”, password:”{{token}}”)

    python3.10 -m twine upload –repository testpypi dist/*

  • Upload to pypi (with name:”__token__”, password:”{{token}}”)

    python3.10 -m twine upload dist/*

Be the first to comment

Leave a Reply

Your email address will not be published.


*