LoginSignup
6
6

More than 5 years have passed since last update.

PyPI 登録めも

Posted at

目的

  • 自作した Python のパッケージを PyPI で公開する時のめも

setup.py を書く

お作法

公式ドキュメントを参考に書いていきます.

パッケージを PyPI に登録

初回登録を済ませるとホームディレクトリに .pypirc が作成されます.

$ python setup.py register

パッケージを PyPI に公開

ソース, バイナリ配布, egg を配布する場合は以下のようになります.

$ python setup.py sdist bdist bdist_egg upload

.gitignore に追記すること

公開する時にいろいろ生成されるファイル群は ignore 対象にします.

. gitignore
*.egg-info
*.pyc
dist
build

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6