Python setup. py and MANIFEST. in files,
Setup. py file
From setuptools import setupfrom codecs import open # third-party dependent package and version requires = ['beautifulsoup4> = 4.3.2 ', 'gearman> = 2.0.2', 'pymongo> = 2.7.2 ', 'threadpool> = 1.2.7', 'geoip2> = 2.1.0 ', 'pywin32> = 100'] # package list packages = ['mse', 'mse. device ', 'mse. proxy', 'mse. else ', '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 = 'edwin. yy.yang@foxmail.com ', 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 dependent', 'Programming Language: python', 'Programming Language: Python: 6666', 'topic: Software Development :: libraries: Python Modules ',],)
MANIFEST. in File
include HISTORY.rstinclude MANIFEST.inrecursive-include MES/Utility *.mmdb
Description
1. zip_safe = False do not compress into an egg file, but install egg as a directory
2. include_package_data = True, including package data
3. MANIFEST. in file, used to include other files
4. Release the Manayer. py tool script:
Entry_points = {'console _ scripts ':[
'Mse-Manager = MSE. Worker. Manager: main ',
]},
Two files: MSE-Manager.exe and MSE-Manager.py are generated under the Scripts folder in the Python system directory after installation
5. Packaging command: python setup. py sdist
Address: http://blog.csdn.net/fragmentalice/article/details/44833013