-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
executable file
·58 lines (53 loc) · 1.9 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from setuptools import setup, find_packages
try:
# for pip >= 10
from pip._internal.req import parse_requirements
except ImportError:
# for pip <= 9.0.3
from pip.req import parse_requirements
from os import path as os_path
this_directory = os_path.abspath(os_path.dirname(__file__))
def load_requirements(fname):
reqs = parse_requirements(fname, session="test")
return [str(ir.req) for ir in reqs]
# 读取文件内容
def read_file(filename):
with open(os_path.join(this_directory, filename), encoding='utf-8') as f:
long_description = f.read()
return long_description
setup(
name='mkdocs-mk2pdf-plugin',
version='0.1.6',
description='An MkDocs plugin to export content pages as PDF files',
long_description=read_file('README.md'), # 读取的Readme文档内容
long_description_content_type="text/markdown", # 指定包文档格式为markdown
keywords='mkdocs pdf export',
url='https://github.com/HaoLiuHust/mkdocs-mk2pdf-plugin',
author='Liu, Hao',
author_email='[email protected]',
license='MIT',
python_requires='>=3.4',
install_requires=[
'mkdocs>=1.1.2',
'beautifulsoup4>=4.6.3',
],
#install_requires=load_requirements("requirements.txt"),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
],
packages=find_packages(),
entry_points={
'mkdocs.plugins': [
'mk2pdf-export = mkdocs_mk2pdf_plugin.plugin:MK2PdfPlugin'
]
}
)