-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
78 lines (72 loc) · 3.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from setuptools import setup
from distutils.core import Extension
import platform
import sys
import time
from glob import glob
packages = ['fchart3']
ext_modules = []
try:
import numpy
include_dirs = [numpy.get_include()]
have_numpy = True
except:
have_numpy = False
ext_modules = []
include_dirs = []
sys.stdout.write('Numpy not found: Not building C extensions\n')
time.sleep(5)
if platform.system() == 'Darwin':
extra_compile_args = ['-arch','i386','-arch','x86_64']
extra_link_args = ['-arch','i386','-arch','x86_64']
else:
extra_compile_args = []
extra_link_args = []
if have_numpy:
include_dirs += ['fchart3/htm','fchart3/htm/htm_src','fchart3/htm/include']
htm_sources = glob('fchart3/htm/htm_src/*.cpp')
htm_sources += ['fchart3/htm/htmc.cc','fchart3/htm/htmc_wrap.cc']
htm_module = Extension('fchart3.htm._htmc',
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
sources=htm_sources,
include_dirs=include_dirs)
ext_modules.append(htm_module)
packages.append('fchart3.htm')
setup(
name='fchart3',
version='0.10.3',
description='Collection of Python scripts to make beautiful deepsky charts in various formats',
keywords='fchart3 starchart star charts finder chart astronomy map',
url='https://github.com/skybber/fchart3',
author='Michiel Brentjens <[email protected]>, Austin Riba <[email protected]>, Vladimir Dvorak<[email protected]',
author_email='[email protected]',
packages=packages,
include_package_data=True,
install_requires=['numpy', 'pycairo', 'Pillow', 'skia-python'],
scripts=['bin/fchart3'],
package_data={'fchart3': ['data/catalogs/bsc5.dat',
'data/catalogs/constbndJ2000.dat',
'data/catalogs/constellation_boundaries.dat',
'data/catalogs/constellationship_western.fab',
'data/catalogs/convert_stellarium_boundaries.txt',
'data/catalogs/cross-id.dat',
'data/catalogs/deep_sky.hnd',
'data/catalogs/milkyway.dat',
'data/catalogs/milkyway_enhanced.dat',
'data/catalogs/namedstars.dat',
'data/catalogs/outlines_catgen.dat',
'data/catalogs/PGC.dat',
'data/catalogs/PGC_update.dat',
'data/catalogs/starnames.dat',
'data/catalogs/stars_0_0v0_8.cat',
'data/catalogs/stars_1_0v0_8.cat',
'data/catalogs/stars_2_0v0_8.cat',
'data/catalogs/stars_3_1v0_4.cat',
'data/catalogs/unnamedstars.dat',
'data/catalogs/vic.txt',
'data/default.conf',
]},
ext_modules=ext_modules,
include_dirs=include_dirs,
)