This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
70 lines (60 loc) · 1.85 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
"""Set up the project."""
# Standard library
from typing import List
from typing import Sequence
# Third-party
from pkg_resources import parse_requirements
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.rst",
"README.md",
"HISTORY",
"HISTORY.rst",
"HISTORY.md",
]
metadata = {
"name": "fls_sat_verif",
"version": "0.1.0",
"description": "Satellite-based verification of fog and low stratus forecasts",
"long_description": read_present_files(description_files),
"author": "Stephanie Westerhuis",
"author_email": "[email protected]",
"url": "https://github.com/swester/fls_sat_verif",
"keywords": "fls_sat_verif",
"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)
with open("requirements/requirements.in") as f:
requirements = list(map(str, parse_requirements(f.readlines())))
scripts = [
"fls_sat_verif=fls_sat_verif.cli:main",
]
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,
)