forked from mlee03/FMSgridtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (59 loc) · 1.74 KB
/
setup.py
File metadata and controls
66 lines (59 loc) · 1.74 KB
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
import os
import subprocess
from pathlib import Path
from typing import List
from setuptools import find_namespace_packages, setup
from setuptools.command.install import install
class CustomInstall(install):
def run(self):
with open("compile_log.txt", "w") as f:
subprocess.run(
["cmake", ".."],
cwd="./FREnctools_lib/cfrenctools/c_build",
stdout=f,
stderr=subprocess.STDOUT,
check=True,
)
subprocess.run(
["make"],
cwd="./FREnctools_lib/cfrenctools/c_build",
stdout=f,
stderr=subprocess.STDOUT,
check=True,
)
install.run(self)
test_requirements = ["pytest", "coverage"]
develop_requirements = test_requirements + ["pre-commit"]
extras_requires = {
"test": test_requirements,
"develop": develop_requirements,
}
requirements: List[str] = [
"click",
"gitpython",
"h5netcdf",
"h5py",
"numpy",
"xarray",
"netCDF4",
]
setup(
author = "NOAA",
python_requires=">3.11",
classifiers="",
install_requires=requirements,
extras_require=extras_requires,
name="fmsgridtools",
license="",
packages=find_namespace_packages(include=["FMSgridtools", "FMSgridtools.*", "FREnctools_lib", "FREnctools_lib.pyfrenctools.*"]),
include_package_data=True,
version="0.0.1",
zip_safe=False,
cmdclass={'install': CustomInstall},
entry_points={
"console_scripts": [
"fmsgridtools make_hgrid = fmsgridtools.make_grid.hgrid.make_hgrid:main",
"make_topog = FMSgridtools.make_topog.make_topog:make_topog", # TODO fmsgridtools entrypoint
]
},
)