forked from brandon-rhodes/pyephem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
69 lines (60 loc) · 2.39 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
import os
import sys
from distutils.core import setup, Extension
from glob import glob
# Work-around.
if 'bdist_wheel' in sys.argv:
del setup, Extension
from setuptools import setup, Extension
# Read the current version from ephem/__init__.py itself.
path = os.path.join(os.path.dirname(__file__), 'ephem', '__init__.py')
for line in open(path):
if line.startswith('__version__'):
__version__ = eval(line.split(None, 2)[2]) # skip '__version__', '='
# The 'ephem' module is built from every .c file in the libastro
# directory plus ...
libastro_version = '3.7.7'
libastro_files = glob('libastro-%s/*.c' % libastro_version)
libastro_data = glob('extensions/data/*.c')
def read(*filenames):
return open(os.path.join(os.path.dirname(__file__), *filenames)).read()
extensions = [
Extension('ephem._libastro',
['extensions/_libastro.c', 'extensions/dtoa.c']
+ libastro_files + libastro_data,
include_dirs=['libastro-' + libastro_version, '.'],
),
]
setup(name = 'ephem',
version = __version__,
description = 'Compute positions of the planets and stars',
long_description = read('README.rst'),
license = 'LGPL',
author = 'Brandon Rhodes',
author_email = '[email protected]',
url = 'http://rhodesmill.org/pyephem/',
classifiers = [
'Development Status :: 6 - Mature',
'Intended Audience :: Science/Research',
'License :: OSI Approved ::'
' GNU Library or Lesser General Public License (LGPL)',
'Topic :: Scientific/Engineering :: Astronomy',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
packages = [ 'ephem', 'ephem.tests' ],
package_data = { 'ephem': ['doc/*.rst',
'tests/jpl/*.txt',
'tests/usno/*.txt',
],},
ext_modules = extensions,
)