-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
60 lines (54 loc) · 2.06 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
import sys
from distutils.core import setup, Extension
if __name__ == '__main__':
if "--force" in sys.argv:
run_build = True
sys.argv.remove('--force')
else:
non_build_actions = ['--help-commands', 'egg_info', 'clean', '--version']
if '--help' in sys.argv[1:] or sys.argv[1] in non_build_actions:
run_build = False
else:
run_build = True
metadata = dict(
name='naturalneighbor',
version='0.2.2',
description='Fast, discrete natural neighbor interpolation in 3D on a CPU.',
long_description=open('README.rst', 'r').read(),
author='Reece Stevens',
author_email='rstevens@innolitics.com',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
'Topic :: Software Development',
],
keywords='interpolation scipy griddata numpy sibson',
install_requires=[
'numpy>=1.13',
],
url='https://github.com/innolitics/natural-neighbor-interpolation',
packages=['naturalneighbor'],
)
if run_build:
import numpy.distutils.misc_util
module = Extension(
'cnaturalneighbor',
include_dirs=numpy.distutils.misc_util.get_numpy_include_dirs(),
library_dirs=['/usr/local/lib'],
extra_compile_args=['--std=c++11', '-O3'],
sources=[
'naturalneighbor/cnaturalneighbor.cpp',
],
)
metadata['ext_modules'] = [module]
setup(**metadata)