-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (52 loc) · 1.72 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
try: # for pip >= 20.0.2
from pip._internal.network.session import PipSession
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 20.0.2
from pip._internal.download import PipSession # type: ignore
from pip._internal.req import parse_requirements
import os
from setuptools import find_packages, setup
from pyCLI import __version__
REQUIREMENTS = [
req.requirement if hasattr(req, "requirement") else str(req.req) # type: ignore
for req in parse_requirements(
os.path.join(os.path.dirname(__file__), "requirements.txt"),
session=PipSession(),
)
]
EXTRAS_REQUIRE = {
"build": ["wheel", "twine"],
"lint": ["flake8", "black", "mypy", "isort", "rope"],
"sec": ["bandit", "safety", "pre-commit"],
}
EXTRAS_REQUIRE["dev"] = (
EXTRAS_REQUIRE["build"] + EXTRAS_REQUIRE["lint"] + EXTRAS_REQUIRE["sec"]
)
URL = "https://github.com/tillstud/pyCLI"
def read(fname):
"""Read the content of the file `fname`."""
with open(fname) as fp:
content = fp.read()
return content
setup(
name="pyCLI",
version=__version__,
description="A template to structure your next CLI",
long_description=read("README.md"),
long_description_content_type="text/markdown",
author="Till Studer",
author_email="[email protected]",
url=URL,
packages=find_packages(),
install_requires=REQUIREMENTS,
extras_require=EXTRAS_REQUIRE,
license="MIT",
keywords="cli, template",
classifiers=[
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3.10",
],
python_requires=">=3.10.0",
entry_points={"console_scripts": ["pyCLI=pyCLI.cli:cli"]},
)