forked from radiocosmology/draco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
61 lines (52 loc) · 1.53 KB
/
setup.py
File metadata and controls
61 lines (52 loc) · 1.53 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
# === Start Python 2/3 compatibility
from __future__ import absolute_import, division, print_function
from future.builtins import * # noqa pylint: disable=W0401, W0614
from future.builtins.disabled import * # noqa pylint: disable=W0401, W0614
# === End Python 2/3 compatibility
import sys
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
import numpy as np
import draco
# Enable OpenMP support if available
if sys.platform == "darwin":
compile_args = []
link_args = []
else:
compile_args = ["-fopenmp"]
link_args = ["-fopenmp"]
# Cython module for fast operations
fast_ext = Extension(
"draco.util._fast_tools",
["draco/util/_fast_tools.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=compile_args,
extra_link_args=link_args,
)
trunc_ext = Extension(
"draco.util.truncate",
["draco/util/truncate.pyx"],
include_dirs=[np.get_include()],
extra_compile_args=compile_args,
extra_link_args=link_args,
)
setup(
name="draco",
version=draco.__version__,
license="MIT",
packages=find_packages(),
ext_modules=cythonize([fast_ext, trunc_ext]),
install_requires=[
"Cython>0.18",
"numpy>=1.7",
"scipy>=0.10",
"RandomGen",
"caput>=0.4",
"cora",
"driftscan>=1.2",
],
author="Richard Shaw",
author_email="richard@phas.ubc.ca",
description="Analysis and simulation tools for driftscan radio interferometers.",
url="http://github.com/radiocosmology/draco/",
)