-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (59 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# type: ignore
import importlib.util
import pathlib
import setuptools
import typing
KEYWORDS = [
"apidocs",
"bibliography",
"documentation",
"glossary",
"kglab",
"knowledge graph",
"mkdocs",
"plugin",
"reference",
]
def parse_requirements_file (filename: str) -> typing.List:
"""read and parse a Python `requirements.txt` file, returning as a list of str"""
with pathlib.Path(filename).open() as f:
return [ l.strip().replace(" ", "") for l in f.readlines() ]
if __name__ == "__main__":
spec = importlib.util.spec_from_file_location("mkrefs.version", "mkrefs/version.py")
mkrefs_version = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mkrefs_version)
setuptools.setup(
name = "mkrefs",
version = mkrefs_version.__version__,
description = "MkDocs plugin to generate semantic reference Markdown pages",
long_description = pathlib.Path("README.md").read_text(),
long_description_content_type = "text/markdown",
author = "Paco Nathan",
author_email = "[email protected]",
license = "MIT",
url = "",
python_requires = ">=3.6",
packages = setuptools.find_packages(exclude=[ "docs" ]),
install_requires = parse_requirements_file("requirements.txt"),
entry_points = {
"mkdocs.plugins": [
"mkrefs = mkrefs.plugin:MkRefsPlugin",
],
"console_scripts": [
"mkrefs = mkrefs.cli:cli",
],
},
keywords = ", ".join(KEYWORDS),
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Documentation",
"Topic :: Software Development :: Documentation",
"Topic :: Text Processing :: Markup :: Markdown",
]
)