forked from spacetelescope/drizzlepac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·43 lines (36 loc) · 875 Bytes
/
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
#!/usr/bin/env python
import sys
from glob import glob
from pathlib import Path
import numpy
from astropy import wcs
from setuptools import setup, Extension
# Setup C module include directories
include_dirs = []
numpy_includes = [numpy.get_include()]
wcs_include_path = Path(wcs.get_include())
wcs_includes = [
str(wcs_include_path / 'astropy_wcs'),
str(wcs_include_path / 'wcslib'),
]
include_dirs.extend(numpy_includes)
include_dirs.extend(wcs_includes)
# Setup C module macros
define_macros = []
# Handle MSVC `wcsset` redefinition
if sys.platform == 'win32':
define_macros += [
('_CRT_SECURE_NO_WARNING', None),
('__STDC__', 1)
]
ext_modules = [
Extension(
'drizzlepac.cdriz',
glob('src/*.c'),
include_dirs=include_dirs,
define_macros=define_macros,
)
]
setup(
ext_modules=ext_modules,
)