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 技術手冊 第三版
setuptools
|
777
具名引數
packages
py_modules
並沒有列出檔案路徑,而
是分別列出 Python 套件和模組。因此,在這些具名引數的
值中,別使用路徑分隔符號或延伸檔名。如果你在引數
packages
中列出子套件名稱(subpackage names),就改
Python 的點號語法(例如
top_package.sub_package
)。
Python 原始碼檔案
預設情況下,
setup
會在 distribution root 目錄中找尋 Python 模組(列於
具名引數
py_modules
的值中),而 distribution root 目錄的子目錄則作為
Python 套件(列於具名引數
packages
的值中)。
這裡有你最常用來詳細指示哪些 Python 原始碼檔案是 distribution 一部分
setup
具名引數:
entry_points entry_points={'group':['name=P.m:obj',],}
entry_points
是一個
dict
,持有一或多個
群組
groups;每個
group
name=value
字串所成的一個串列。
name
是一個識別字,而
value
是一
Python 模組
P.m
(套件部分的
P.
是選擇性的),後面接著在
m
中的一
個函式、類別或其他物件
obj
,在模組和物件之間以一個冒號
:
作為分
隔符號。
group
可以是一個外掛(plug-in)、剖析器(parser),或其他服務
service)。此用途進一步的資訊請參閱 ...
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