-
Notifications
You must be signed in to change notification settings - Fork 32
/
setup.py
88 lines (79 loc) · 2.2 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from pathlib import Path
from setuptools import find_packages, setup
try:
from sphinx.setup_command import BuildDoc
cmdclass = {"build_sphinx": BuildDoc}
except ImportError:
# Skip cmdclass when sphinx is not installed (yet)
cmdclass = {}
# Read the contents of README.md, for PyPI
LONG_DESCRIPTION = (Path(__file__).parent / "README.md").read_text()
SETUP_REQUIREMENTS = ["setuptools>=28", "setuptools_scm"]
REQUIREMENTS = [
"resdata>=5.0.0-b0",
"numpy",
"opm>=2020.10.2",
"pandas",
"pyarrow",
"pyyaml>=5.1",
"treelib",
]
TEST_REQUIREMENTS = (
Path("test_requirements.txt").read_text(encoding="utf-8").splitlines()
)
TYPES_REQUIREMENTS = (
Path("types_requirements.txt").read_text(encoding="utf-8").splitlines()
)
DOCS_REQUIREMENTS = [
"autoapi",
"ipython",
"rstcheck",
"setuptools",
"sphinx<7",
"sphinx-argparse",
"sphinx-autodoc-typehints",
"sphinx_rtd_theme",
]
EXTRAS_REQUIRE = {
"tests": TEST_REQUIREMENTS,
"style": ["pre-commit"],
"types": TYPES_REQUIREMENTS,
"docs": DOCS_REQUIREMENTS,
"ert": ["ert>=10.2.0b13"],
}
setup(
name="res2df",
use_scm_version={"write_to": "res2df/version.py"},
cmdclass=cmdclass,
description="Convert reservoir simulator input and output to DataFrames",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
url="http://github.com/equinor/res2df",
author="Håvard Berland",
author_email="[email protected]",
license="GPLv3",
packages=find_packages(include=["res2df*"]),
package_dir={"res2df": "res2df"},
package_data={
"res2df": [
"opmkeywords/*",
"config_jobs/*",
"py.typed",
"svg_color_keyword_names.txt",
]
},
zip_safe=False,
entry_points={
"console_scripts": [
"csv2res=res2df.csv2res:main",
"res2csv=res2df.res2csv:main",
"res2arrow=res2df.res2csv:main",
],
"ert": ["res2df_jobs = res2df.hook_implementations.jobs"],
},
test_suite="tests",
install_requires=REQUIREMENTS,
setup_requires=SETUP_REQUIREMENTS,
extras_require=EXTRAS_REQUIRE,
python_requires=">=3.8",
)