forked from CyanideCN/PyCINRAD
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
62 lines (54 loc) · 1.43 KB
/
setup.py
File metadata and controls
62 lines (54 loc) · 1.43 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
from setuptools import setup, find_packages
from setuptools.extension import Extension
from os.path import join, exists, sep
import numpy as np
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
pyx_paths = [
join("cinrad", "_utils"),
join("cinrad", "correct", "_unwrap_2d"),
]
ext_suffix = ".pyx" if USE_CYTHON else ".c"
ext_modules = [
Extension(
path.replace(sep, "."),
[path + ext_suffix],
define_macros=macros,
) for path in pyx_paths
]
if USE_CYTHON:
ext_modules = cythonize(ext_modules)
data_pth = join("cinrad", "data")
setup(
name="cinrad",
version="1.9.3",
description="Decode CINRAD radar data and visualize",
long_description="Decode CINRAD radar data and visualize",
license="GPL Licence",
author="PyCINRAD Developers",
author_email="dpy274555447@gmail.com",
packages=find_packages(),
include_package_data=True,
platforms="Windows",
python_requires=">=3.9",
install_requires=[
"metpy>=0.8",
"cartopy>=0.15",
"pyshp!=2.0.0, !=2.0.1",
"matplotlib>=2.2",
"vanadis",
"cinrad_data>=0.1"
],
package_dir={"cinrad": "cinrad"},
package_data={"cinrad": [
"data/*.*",
"data/*/*.*"
]},
scripts=[],
ext_modules=ext_modules,
include_dirs=[np.get_include()],
)