-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·128 lines (117 loc) · 3.42 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/python3
import os
import sys
from glob import glob
from setuptools import setup, Extension, Command
from setuptools.command.build_py import build_py
import subprocess
from subprocess import call
class build(build_py):
def run(self):
self.run_command('build_scss')
build_py.run(self)
class build_scss(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
with open(os.devnull, 'w') as fp:
proc = subprocess.Popen(['sass', '-v'], stdout=fp, stderr=fp)
proc.communicate()
except OSError:
print('warning: sass not available, will not rebuild stylesheets', file=sys.stderr)
return
cmd = ['sass', '--update', 'ccbrowse.scss:ccbrowse.css']
print(' '.join(cmd))
try:
ret = call(cmd, cwd='ccbrowse/www/css')
if ret != 0:
sys.exit(1)
except OSError as e:
print(e.strerror, file=sys.stderr)
sys.exit(1)
setup(
name='ccbrowse',
version='1.1.2',
description='Web application for browsing data from the CALIPSO and CloudSat satellites',
author='Peter Kuma',
author_email='[email protected]',
url='https://ccplot.org/ccbrowse/',
license = 'MIT',
classifiers = [
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3',
'Programming Language :: Cython',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Atmospheric Science',
],
python_requires='>=3.7.0',
setup_requires=[
'cython',
],
install_requires=[
'pytz>=2021.3',
'python-dateutil>=2.8.2',
'pillow>=9.0.1',
'numpy>=1.16.2',
'scipy>=1.1.0',
'shapely>=1.5.13',
'bottle>=0.12.19',
'jinja2>=3.0.3',
'gunicorn>=20.1.0',
'netCDF4>=1.5.5',
],
packages=[
'ccbrowse',
'ccbrowse.products',
'ccbrowse.storage',
],
scripts=[
'bin/ccimport',
'bin/ccbrowse',
'bin/ccserver',
'bin/cchtree-clean',
],
include_package_data=True,
zip_safe=False,
cmdclass = {
'build_py': build,
'build_scss': build_scss,
},
ext_modules=[
Extension('ccbrowse.algorithms',
['ccbrowse/algorithms.pyx'],
extra_compile_args=['-march=native'],
),
Extension('ccbrowse.hdf',
['ccbrowse/hdf.pyx'],
libraries=['mfhdf', 'df', 'jpeg', 'z'],
extra_compile_args=[
'-I/usr/include/hdf',
'-I/usr/include/x86_64-linux-gnu/hdf',
'-march=native'
],
),
Extension('ccbrowse.hdfeos',
['ccbrowse/hdfeos.pyx'],
libraries=['hdfeos', 'mfhdf', 'df', 'jpeg', 'z'],
extra_compile_args=[
'-I/usr/include/hdf',
'-I/usr/include/x86_64-linux-gnu/hdf',
'-march=native'
],
),
],
data_files=[
('share/man/man1', glob('man/*.1')),
],
)