-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (35 loc) · 1.23 KB
/
Copy pathsetup.py
File metadata and controls
50 lines (35 loc) · 1.23 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
#!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join
import os
import sys
import subprocess
def generate_cython():
cwd = os.path.abspath(os.path.dirname(__file__))
print("Cythonizing sources")
p = subprocess.call([sys.executable,
os.path.join(cwd, 'tools', 'cythonize.py'),
'ckdtreebench'],
cwd=cwd)
if p != 0:
raise RuntimeError("Running cythonize failed!")
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(None, parent_package, top_path)
config.set_options(ignore_setup_xxx_py=True,
assume_default_configuration=True,
delegate_options_to_subpackages=True,
quiet=True)
config.add_subpackage('ckdtreebench')
return config
def setup_package():
metadata = dict(
name='ckdtreebench',
maintainer="Sturla Molden"
)
from numpy.distutils.core import setup
generate_cython()
metadata['configuration'] = configuration
setup(**metadata)
if __name__ == '__main__':
setup_package()