Setup.py文件

from setuptools import setup
from 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 = '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 Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)

MANIFEST.in文件

详细格式和參数參考https://docs.python.org/2/distutils/sourcedist.html

include HISTORY.rst
include MANIFEST.in
recursive-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文件的更多相关文章

  1. python setup.py install 报错ImportError: No module named setuptools

    学习光荣之路python课程时,使用python setup.py install安装其他模块时,第一次安装某模块成功了.安装另一模块却报错ImportError: No module named s ...

  2. pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in

    问题 Mac 下通过 pip 安装 icu 失败. 解决办法及原因 问题的原因是因为icu库中的某一行代码找不到一个文件,获取不到ICU_VERSION的值. # Install icu brew i ...

  3. Command "python setup.py egg_info" failed with error code 1一种问题的解决方法

    问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...

  4. Windows下安装BeautifulSoup4显示'You are trying to run the Python 2 version of Beautiful Soup under Python 3.(`python setup.py install`) or by running 2to3 (`2to3 -w bs4`).'

    按照网上教程,将cmd的目录定位到解压缩文件夹地址,然后 >>python setup.py install ( Window下不能直接解压tar.giz文件,可以使用7z解压软件提取解压 ...

  5. python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in

    pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl ...

  6. Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1

    Python3安装turtle提示错误:Command "python setup.py egg_info" failed with error code 1 Python3.5安 ...

  7. 【mlflow】打包:npm run build + python setup.py sdist

    mlflow是一个开源机器学习平台 最近需要使用一个它的最新版本,但是这个最新版本没有git包,无法通过pip install安装,需要打包安装. 打包完之后在项目的dist文件夹中有打包后的压缩包, ...

  8. python setup.py install 报错:error: [WinError 3] 系统找不到指定的路径。: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib

    Outline 在通过 setup.py 安装python模块时,遇到了以下报错: # 执行 python setup.py install # 报错: error: [WinError 3] 系统找 ...

  9. python setup.py install 报错

    python setup.py install 报错信息 [root@VM_25_28_centos psutil-2.0.0]# python setup.py install running in ...

随机推荐

  1. get_class 方法

    get_class 返回对象的类名 get_class (PHP 4, PHP 5) get_class — 返回对象的类名 说明 string get_class ([ object $obj ] ...

  2. “取出数据表中第10条到第20条记录”的sql语句+selecttop用法

    1.首先,select top用法: 参考问题 select top n * from和select * from的区别 select * from table -- 取所有数据,返回无序集合 sel ...

  3. BZOJ4516 [Sdoi2016]生成魔咒 【后缀自动机】

    题目 魔咒串由许多魔咒字符组成,魔咒字符可以用数字表示.例如可以将魔咒字符 1.2 拼凑起来形成一个魔咒串 [1,2]. 一个魔咒串 S 的非空字串被称为魔咒串 S 的生成魔咒. 例如 S=[1,2, ...

  4. 【HDU 3746 Cyclic Nacklace】

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission( ...

  5. 使用caffe测试自己的图片

    第一种方法是测试批量图片,使用caffe.bin即可,首先要做的是把你的jpg图片转换为LMDB的格式,如何转换呢?用/build/tools/convert_image --resize_width ...

  6. photoshop 安装

    Photoshop 下载: http://www.duote.com/soft/54352.html 下载完后解压选择..\Adobe CS6\Set-up.exe ,点击  Set-up.exe   ...

  7. c++ 中 define

    1.简单的define定义 #define MAXTIME 1000 一个简单的MAXTIME就定义好了,它代表1000,如果在程序里面写 if(i<MAXTIME){.........} 编译 ...

  8. 17.2.10 NOIP模拟赛 藏妹子之处(excel)

    藏妹子之处(excel) 问题描述: 今天CZY又找到了三个妹子,有着收藏爱好的他想要找三个地方将妹子们藏起来,将一片空地抽象成一个R行C列的表格,CZY要选出3个单元格.但要满足如下的两个条件: ( ...

  9. DataRelation 实现父子表 父子级 Repeater的嵌套使用

    原文发布时间为:2009-05-21 -- 来源于本人的百度文章 [由搬家工具导入] DataRelation 实现父子表         if (!IsPostBack)        {      ...

  10. 用Gson解析没有数据头的纯数组json字符串

    无数据头Json字符串 Json字符串只有数组,而次数组没有名字,如下 [ { "name": "zhangsan", "age": &qu ...