Skip to Content
Python 技術手冊 第三版
book

Python 技術手冊 第三版

by lex Martelli, Anna Martelli Ravenscroft, Steve Holden
January 2018
Intermediate to advanced content levelIntermediate to advanced
856 pages
17h 17m
Chinese
GoTop Information, Inc.
Content preview from Python 技術手冊 第三版
發布你的套件
|
789
註冊並上傳到 PyPI
如果你從未使用過 PyPI,就以一組使用者名稱和密碼創建一個使用者帳
號。(你可以在註冊的步驟中這麼做,但最好還是在線上的 PyPI
https://
pypi.python.org/pypi
)進行。)你也應該在 testpypi
https://testpypi.python.
org/pypi
)上建立一個使用者帳號,以在上傳到公開存放庫之前,練習上傳
套件到一個暫時的存放庫。
如果你是在上傳套件到 PyPI,那麼在你初次上傳它之前,你可能需要註
冊該套件。使用適當的命令來指定你要註冊的 wheel sdist(單純使用
dist/*
是行不通的):
twine register -r repo dist/mypkg.whl # 用於 wheel
twine register -r repo dist/mydist.tar.gz # 用於 sdist
repo
是你註冊你套件的特殊存放庫,如你的
~/.pypirc
檔案中所列的。或
者,你也可以在命令列使用旗標
--repository-url
來提供存放庫的 URL
Warehouse
PyPI 新的後端(backend)。註冊不再是必須的。你現在可以
將它加到你的
~/.pypirc
,如前面的範例所示。不以
-r
執行
twine
預設應該
就能上傳到正確版本的 PyPI
一旦你的套件註冊了,你就能在你套件的頂層使用下列的命令上傳它;
twine
會找到你的 distribution 最新的版本,並將它上傳到你的
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

測試驅動開發|使用 Python

測試驅動開發|使用 Python

Harry J.W. Percival
Linux 内核观测技术BPF

Linux 内核观测技术BPF

David Calavera, Lorenzo Fontana

Publisher Resources

ISBN: 9789864766819