-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (62 loc) · 1.79 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
"""Set up the project."""
# Standard library
from typing import List
from typing import Sequence
# Third-party
from setuptools import find_packages
from setuptools import setup
def read_present_files(paths: Sequence[str]) -> str:
"""Read the content of those files that are present."""
contents: List[str] = []
for path in paths:
try:
with open(path, "r") as f:
contents += ["\n".join(map(str.strip, f.readlines()))]
except FileNotFoundError:
continue
return "\n\n".join(contents)
description_files = [
"README",
"README.md",
"README.rst",
"HISTORY",
"HISTORY.md",
"HISTORY.rst",
]
metadata = {
"name": "pyflexplot-test",
"version": "0.4.10",
"description": "Compare the plots created by two versions of PyFlexPlot.",
"long_description": read_present_files(description_files),
"author": "Stefan Ruedisuehli",
"author_email": "[email protected]",
"url": "https://github.com/MeteoSwiss-APN/pyflexplot-test",
"keywords": "pyflexplot-test",
"classifiers": [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
}
python = ">= 3.7"
# Runtime dependencies (unpinned: only critical version restrictions)
requirements = [
"click >= 7.1",
"gitpython >= 3.1",
"typing_extensions",
]
scripts = [
"pyflexplot-test=pyflexplot_test.cli:cli",
]
setup(
python_requires=python,
install_requires=requirements,
entry_points={"console_scripts": scripts},
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
zip_save=False,
**metadata,
)