forked from MetOffice/inline_model_metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (61 loc) · 2.13 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
# (C) British Crown Copyright 2022, Met Office.
# Please see LICENSE for license details.
import os
import setuptools
def get_long_description():
"""Use the contents of README.md as the long description"""
with open("README.md", "r") as fh:
return fh.read()
def extract_version():
"""
Retrieve version information from the __init__.py module.
"""
version = ""
directory = os.path.dirname(__file__)
filename = os.path.join(directory, "inline_model_storms", "__init__.py")
with open(filename) as fd:
for line in fd:
line = line.strip()
if line.startswith("__version__"):
try:
version = line.split("=")[1].strip(" \"'")
except Exception:
pass
break
if not version:
print(f"WARNING: Unable to parse version information from file: {filename}")
version = "0.0.0"
return version
setuptools.setup(
name="inline_model_storms",
packages=["inline_model_storms"],
version=extract_version(),
license="BSD 3-Clause License",
description=(
"inline_model_storms is a package to to run model storms inline with a climate model."
),
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="Met Office",
author_email="[email protected]",
url="https://github.com/MetOffice/inline_model_storms",
download_url="https://github.com/MetOffice/inline_model_storms/releases",
keywords=["climate", "tracking", "inline"],
install_requires=[
"metoffice-afterburner",
"scitools-iris",
"netCDF4",
"numpy",
"tempest-helper",
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
)