forked from GeoStat-Framework/PyKrige
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·111 lines (102 loc) · 3.87 KB
/
setup.py
File metadata and controls
executable file
·111 lines (102 loc) · 3.87 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- coding: utf-8 -*-
"""Kriging Toolkit for Python."""
import os
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
import numpy as np
HERE = os.path.abspath(os.path.dirname(__file__))
# cython extensions ###########################################################
CY_MODULES = []
CY_MODULES.append(
Extension(
"pykrige.lib.cok",
[os.path.join("pykrige", "lib", "cok.pyx")],
include_dirs=[np.get_include()],
)
)
CY_MODULES.append(
Extension(
"pykrige.lib.variogram_models",
[os.path.join("pykrige", "lib", "variogram_models.pyx")],
include_dirs=[np.get_include()],
)
)
EXT_MODULES = cythonize(CY_MODULES) # annotate=True
# This is an important part. By setting this compiler directive, cython will
# embed signature information in docstrings. Sphinx then knows how to extract
# and use those signatures.
# python setup.py build_ext --inplace --> then sphinx build
for ext_m in EXT_MODULES:
ext_m.cython_directives = {"embedsignature": True}
# setup #######################################################################
with open(os.path.join(HERE, "README.rst"), encoding="utf-8") as f:
README = f.read()
with open(os.path.join(HERE, "requirements.txt"), encoding="utf-8") as f:
REQ = f.read().splitlines()
with open(os.path.join(HERE, "requirements_setup.txt"), encoding="utf-8") as f:
REQ_SETUP = f.read().splitlines()
with open(os.path.join(HERE, "requirements_test.txt"), encoding="utf-8") as f:
REQ_TEST = f.read().splitlines()
with open(os.path.join(HERE, "docs", "requirements_doc.txt"), encoding="utf-8") as f:
REQ_DOC = f.read().splitlines()
REQ_DEV = REQ_SETUP + REQ_TEST + REQ_DOC
DOCLINE = __doc__.split("\n")[0]
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Utilities",
]
setup(
name="PyKrige",
description=DOCLINE,
long_description=README,
long_description_content_type="text/x-rst",
author="Benjamin S. Murphy",
author_email="bscott.murphy@gmail.com",
maintainer="Sebastian Mueller, Roman Yurchak",
maintainer_email="info@geostat-framework.org",
url="https://github.com/GeoStat-Framework/PyKrige",
license="BSD (3 clause)",
classifiers=CLASSIFIERS,
platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
include_package_data=True,
python_requires=">=3.5",
use_scm_version={
"relative_to": __file__,
"write_to": "pykrige/_version.py",
"write_to_template": "__version__ = '{version}'",
"local_scheme": "no-local-version",
"fallback_version": "0.0.0.dev0",
},
setup_requires=REQ_SETUP,
install_requires=REQ,
extras_require={
"plot": ["matplotlib"],
"sklearn": ["scikit-learn>=0.19"],
"doc": REQ_DOC,
"test": REQ_TEST,
"dev": REQ_DEV,
},
packages=find_packages(exclude=["tests*", "docs*"]),
ext_modules=EXT_MODULES,
include_dirs=[np.get_include()],
)