forked from WorldWideTelescope/toasty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
114 lines (94 loc) · 2.92 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# -*- mode: python; coding: utf-8 -*-
# Copyright 2013-2020 Chris Beaumont and the AAS WorldWide Telescope team
# Licensed under the MIT License
from __future__ import absolute_import, division, print_function
from Cython.Distutils import build_ext # in pyproject.toml
import numpy as np # in pyproject.toml
import os
from setuptools import setup, Extension
def get_long_desc():
in_preamble = True
lines = []
with open('README.md', 'rt', encoding='utf8') as f:
for line in f:
if in_preamble:
if line.startswith('<!--pypi-begin-->'):
in_preamble = False
else:
if line.startswith('<!--pypi-end-->'):
break
else:
lines.append(line)
lines.append('''
For more information, including installation instructions, please visit [the
project homepage].
[the project homepage]: https://toasty.readthedocs.io/
''')
return ''.join(lines)
setup_args = dict(
name = 'toasty', # cranko project-name
version = '0.dev0', # cranko project-version
description = 'Generate TOAST image tile pyramids from existing image data',
long_description = get_long_desc(),
long_description_content_type = 'text/markdown',
url = 'https://toasty.readthedocs.io/',
license = 'MIT',
platforms = 'Linux, Mac OS X',
author = 'Chris Beaumont, AAS WorldWide Telescope Team',
author_email = '[email protected]',
classifiers = [
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Visualization',
],
packages = [
'toasty',
'toasty.pipeline',
'toasty.tests',
],
include_package_data = True,
entry_points = {
'console_scripts': [
'toasty=toasty.cli:entrypoint',
],
},
install_requires = [
'filelock>=3',
'numpy>=1.7',
'pillow>=7.0',
'PyYAML>=5.0',
'tqdm>=4.0',
'wwt_data_formats>=0.10.0',
],
extras_require = {
'test': [
'coveralls',
'pytest-cov',
],
'docs': [
'astropy-sphinx-theme',
'numpydoc',
'sphinx',
'sphinx-automodapi',
],
},
cmdclass = {
'build_ext': build_ext,
},
ext_modules = [
Extension('toasty._libtoasty', ['toasty/_libtoasty.pyx']),
],
include_dirs = [
np.get_include(),
]
)
for e in setup_args['ext_modules']:
e.cython_directives = {'language_level': '3'}
if __name__ == '__main__':
setup(**setup_args)