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 技術手冊 第三版
771
25
發布擴充功能與程式
Python
distutils
是標準程式庫的一部分,也是用來封裝(packaging
和發布(distributingPython 程式和擴充功能的工具之基礎。然而,我們
不建議直接使用
distutils
:請改為使用較新的第三方工具。在多數情況
中,你會想要使用
setuptools
wheels
來建立
wheels
,然後使用
twine
它們上傳到你最愛的存放庫(repository,通常是 PyPIPython Package
Index,即The Cheeseshop
https://wiki.python.org/moin/CheeseShop
)),
使用
pip
來下載並安裝它們。如果你沒有安裝
pip
(它隨附於 v2 v3),
請參閱 pip 的安裝頁面(
http://bit.ly/2o9pAH4
)。請確定你用的是最新版
pip
,執行
pip install --upgrade pip
來升級到最新版。在 Windows
上,執行
py -m pip install -U pip setuptools
,然後確定
pip
有在你系統
PAT H 上,方法就跟確定 Python 有在你的 PAT H 上(
http://bit.ly/2mQEItb
時一樣。
在本章中,我們涵蓋了
setuptools
twine
最簡單的用法,可滿足最常見
的封裝需求。要找更深入或進階的說明,請參閱 Python Packaging User
Guide
https://packaging.python.or ...
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