1 Star 0 Fork 2

用心就好/python-docx-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
setup.py 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
Eric Lapouyade 提交于 2021-07-31 12:49 . Working on better subdocs
from setuptools import setup
import os
import re
import sys
# To register onto Pypi :
# python setup.py sdist bdist_wheel upload
def read(*names):
values = dict()
for name in names:
filename = name + '.rst'
if os.path.isfile(filename):
fd = open(filename)
value = fd.read()
fd.close()
else:
value = ''
values[name] = value
return values
long_description = """
%(README)s
News
====
%(CHANGES)s
""" % read('README', 'CHANGES')
def get_version(pkg):
path = os.path.join(os.path.dirname(__file__), pkg, '__init__.py')
if sys.version_info >= (3, 0):
fh = open(path, encoding='utf-8') # required to read utf-8 file on windows
else:
fh = open(path) # encoding parameter does not exist in python 2
with fh:
m = re.search(r'^__version__\s*=\s*[\'"]([^\'"]+)[\'"]', fh.read(), re.M)
if m:
return m.group(1)
raise RuntimeError("Unable to find __version__ string in %s." % path)
setup(name='docxtpl',
version=get_version('docxtpl'),
description='Python docx template engine',
long_description=long_description,
classifiers=[
"Intended Audience :: Developers",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
],
keywords='jinja2',
url='https://github.com/elapouya/python-docx-template',
author='Eric Lapouyade',
license='LGPL 2.1',
packages=['docxtpl'],
install_requires=['six',
'python-docx',
'docxcompose',
'jinja2',
'lxml'],
extras_require={'docs': ['Sphinx', 'sphinxcontrib-napoleon']},
eager_resources=['docs'],
zip_safe=False)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wzf08294119/python-docx-template.git
[email protected]:wzf08294119/python-docx-template.git
wzf08294119
python-docx-template
python-docx-template
master

搜索帮助