File: setup_osx.py

package info (click to toggle)
montage 6.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 45,580 kB
  • sloc: ansic: 144,907; javascript: 4,636; python: 1,625; makefile: 1,447; sh: 230; xml: 48
file content (40 lines) | stat: -rw-r--r-- 1,313 bytes parent folder | download | duplicates (4)
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
import os

from setuptools import setup
from distutils.extension import Extension
from Cython.Build import cythonize

LIB = os.path.join('../..', 'lib')
MONTAGELIB = os.path.join('../..', 'MontageLib')

objs = []
for obj in os.listdir("lib"):
    objs.append("lib/" + obj)

os.environ['CC'] = 'gcc'
os.environ['CFLAGS'] = ''
os.environ['ARCHFLAGS'] = '-arch x86_64'

extensions = [
    Extension("MontagePy._wrappers", ["MontagePy/_wrappers.pyx"],
        include_dirs = [os.path.join(LIB, 'include'), os.path.join(LIB, 'src', 'bzip2-1.0.6'), MONTAGELIB],
        extra_objects = objs),
    Extension("MontagePy.main", ["MontagePy/main.pyx"],
        include_dirs = [os.path.join(LIB, 'include'), MONTAGELIB])
]

setup(
    name = 'MontagePy',
    version = '1.2.3',
    author = 'John Good',
    author_email = 'jcg@ipac.caltech.edu',
    description = 'Montage toolkit for reprojecting, mosaicking, and displaying astronomical images.',
    long_description=open('README.txt').read(),
    license = 'LICENSE.txt',
    keywords = 'astronomy astronomical image reprojection mosaic visualization',
    url = 'https://github.com/Caltech-IPAC/Montage',
    packages = ['MontagePy'],
    package_data = { 'MontagePy': ['FreeSans.ttf'] },
    ext_modules = cythonize(extensions),
    install_requires = ['requests']
)