日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:python中setuptools是什么

Setuptools是python Distutils的加強(qiáng)版,可以讓程序員更方便的創(chuàng)建和發(fā)布 Python 包,特別是那些對其它包具有依賴性的狀況。用setuptools構(gòu)建和發(fā)布的包與用Distutils發(fā)布的包是類似的。

創(chuàng)新互聯(lián)專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、仁化網(wǎng)絡(luò)推廣、成都微信小程序、仁化網(wǎng)絡(luò)營銷、仁化企業(yè)策劃、仁化品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營等,從售前售中售后,我們都將竭誠為您服務(wù),您的肯定,是我們最大的嘉獎(jiǎng);創(chuàng)新互聯(lián)為所有大學(xué)生創(chuàng)業(yè)者提供仁化建站搭建服務(wù),24小時(shí)服務(wù)熱線:18982081108,官方網(wǎng)址:www.cdcxhl.com

包的使用者無需安裝setuptools就可以使用該包。如果用戶是從源碼包開始構(gòu)建,并且沒有安裝過setuptools的話,則只要在你的setup腳本中包含一個(gè)bootstrap模塊(ez_setup),用戶構(gòu)建時(shí)就會自動下載并安裝setuptools了。

一:基本用例

下面是一個(gè)使用setuptools的簡單例子:

from setuptools import setup, find_packages
setup(
    name = "HelloWorld",
    version = "0.1",
    packages = find_packages(),
)

上面就是一個(gè)最簡單的setup腳本,使用該腳本,就可以產(chǎn)生eggs,上傳PyPI,自動包含setup.py所在目錄中的所有包等。

當(dāng)然,上面的腳本過于簡單,下面是一個(gè)稍微復(fù)雜的例子:

from setuptools import setup, find_packages
setup(
    name = "HelloWorld",
    version = "0.1",
    packages = find_packages(),
    scripts = ['say_hello.py'],
 
    # Project uses reStructuredText, so ensure that the docutils get
    # installed or upgraded on the target machine
    install_requires = ['docutils>=0.3'],
 
    package_data = {
        # If any package contains *.txt or *.rst files, include them:
        '': ['*.txt', '*.rst'],
        # And include any *.msg files found in the 'hello' package, too:
        'hello': ['*.msg'],
    },
 
    # metadata for upload to PyPI
    author = "Me",
    author_email = "me@example.com",
    description = "This is an Example Package",
    license = "PSF",
    keywords = "hello world example examples",
    url = "http://example.com/HelloWorld/",   # project home page, if any
    # could also include long_description, download_url, classifiers, etc.
)


分享名稱:創(chuàng)新互聯(lián)Python教程:python中setuptools是什么
網(wǎng)站地址:http://www.5511xx.com/article/dpgiicc.html