Python setup.py和MANIFEST.in檔案

來源:互聯網
上載者:User

標籤:python

Setup.py檔案
from setuptools import setupfrom codecs import open # 第三方依賴包及版本requires = ['beautifulsoup4>=4.3.2',           'gearman>=2.0.2',           'pymongo>=2.7.2',           'threadpool>=1.2.7',           'geoip2>=2.1.0',           'pywin32>=219'] # 包列表packages = ['MSE',           'MSE.Device',           'MSE.Proxy',           'MSE.Scanner',           'MSE.Utility',           'MSE.Worker',           'MSE.Config'] with open('HISTORY.rst', 'r', 'utf-8') asf:   history = f.read()   setup(   name = 'MSE',   version = '1.2.1',   author = 'Edwin',   author_email = '[email protected]',   description = 'Industry device/system search engine',   long_description = history,   url = '-',   packages = packages,   include_package_data = True,   entry_points = {'console_scripts': [       'MSE-Manager = MSE.Worker.Manager:main',   ]},   package_dir = {'MSE': 'MSE'},   install_requires = requires,   license = 'Apache',   #zip_safe = False,   classifiers = [       'Development Status :: 1 - Production/Stable',       'Intended Audience :: Developers',       'License :: OSI Approved :: Apache Software License',       'Natural Language :: English',       'Operating System :: OS Independent',       'Programming Language :: Python',              'Programming Language :: Python :: 2.7',       'Topic :: Software Development :: Libraries :: Python Modules',   ],)

 MANIFEST.in檔案

include HISTORY.rstinclude MANIFEST.inrecursive-include MES/Utility *.mmdb

 

說明

1.      zip_safe = False 不壓縮為一個egg檔案,而是以目錄的形式安裝egg

2.      include_package_data = True,包含包資料

3.      MANIFEST.in檔案,用於包含其他檔案

4.      發布Manayer.py工具指令碼:

entry_points ={‘console_scripts‘: [

‘MSE-Manager = MSE.Worker.Manager:main‘,

 ]},

安裝後會在Python系統目錄的Scripts檔案夾下產生兩個檔案:MSE-Manager.exe和MSE-Manager.py

5.      打包命令:python setup.py sdist


本文地址:http://blog.csdn.net/fragmentalice/article/details/44833013

Python setup.py和MANIFEST.in檔案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.