1 Star 0 Fork 2

帝者师/python-docx

forked from x-debug/python-docx 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 2.36 KB
一键复制 编辑 原始数据 按行查看 历史
Steve Canny 提交于 2014-06-29 00:15 . test: transplant tests.unitutil.cxml
#!/usr/bin/env python
import os
import re
from setuptools import find_packages, setup
def text_of(relpath):
"""
Return string containing the contents of the file at *relpath* relative to
this file.
"""
thisdir = os.path.dirname(__file__)
file_path = os.path.join(thisdir, os.path.normpath(relpath))
with open(file_path) as f:
text = f.read()
return text
# Read the version from docx.__version__ without importing the package
# (and thus attempting to import packages it depends on that may not be
# installed yet)
version = re.search(
"__version__ = '([^']+)'", text_of('docx/__init__.py')
).group(1)
NAME = 'python-docx'
VERSION = version
DESCRIPTION = 'Create and update Microsoft Word .docx files.'
KEYWORDS = 'docx office openxml word'
AUTHOR = 'Steve Canny'
AUTHOR_EMAIL = 'python-docx@googlegroups.com'
URL = 'https://github.com/python-openxml/python-docx'
LICENSE = text_of('LICENSE')
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
PACKAGE_DATA = {'docx': ['templates/*']}
INSTALL_REQUIRES = ['lxml>=2.3.2']
TEST_SUITE = 'tests'
TESTS_REQUIRE = ['behave', 'mock', 'pyparsing', 'pytest']
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Office/Business :: Office Suites',
'Topic :: Software Development :: Libraries'
]
LONG_DESCRIPTION = text_of('README.rst') + '\n\n' + text_of('HISTORY.rst')
params = {
'name': NAME,
'version': VERSION,
'description': DESCRIPTION,
'keywords': KEYWORDS,
'long_description': LONG_DESCRIPTION,
'author': AUTHOR,
'author_email': AUTHOR_EMAIL,
'url': URL,
'license': LICENSE,
'packages': PACKAGES,
'package_data': PACKAGE_DATA,
'install_requires': INSTALL_REQUIRES,
'tests_require': TESTS_REQUIRE,
'test_suite': TEST_SUITE,
'classifiers': CLASSIFIERS,
}
setup(**params)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/fxh/python-docx.git
git@gitee.com:fxh/python-docx.git
fxh
python-docx
python-docx
master

搜索帮助