seanbbear / pypi-package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何將寫好的package上傳到pypi供人安裝使用

參考網站

如何更新

把package整理成如下形式

/example_pkg
  /example_pkg
    __init__.py
  setup.py
  LICENSE
  README.md

編輯setup.py

每次都要更新版本號

刪除dist資料夾

生成distribution archives

python setup.py sdist bdist_wheel

若未刪除dist 可以用

twine upload --skip-existing dist/*

忽略已建立的dist

上傳distribution archives

twine upload dist/* 或者 python -m twine upload dist/*

參考網站

About