forked from tommyod/KDEpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (49 loc) · 1.58 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
#!/usr/bin/env python3
"""KDEpy installer script using setuptools.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
from setuptools import Extension, setup
try:
from Cython.Distutils import build_ext
import numpy as np
except ImportError:
can_build_ext = False
else:
can_build_ext = True
# If this is incremented, also increment in __init__.py
VERSION = "0.6.9"
cmdclass = {}
ext_modules = []
include_dirs = []
if can_build_ext:
cmdclass["build_ext"] = build_ext
ext_modules.append(Extension("cutils", ["KDEpy/cutils.pyx"]))
include_dirs.append(np.get_include())
else:
# Build extension with previously Cython generated source.
ext_modules.append(Extension("cutils", ["KDEpy/cutils.c"]))
setup(
name="KDEpy",
version=VERSION,
description="Kernel Density Estimation in Python.",
long_description="Kernel Density Estimation in Python.",
url="https://github.com/tommyod/KDEpy",
author="tommyod",
author_email="[email protected]",
license="GNU GPLv3",
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
packages=["KDEpy"],
install_requires=["numpy>=1.14.2", "scipy>=1.0.1", "matplotlib>=2.2.0"],
cmdclass=cmdclass,
include_dirs=include_dirs,
ext_modules=ext_modules,
)