-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
86 lines (77 loc) · 2.71 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
import os
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext as _build_ext
from glob import glob
from auviewer import __VERSION__
NAME = 'auviewer'
VERSION = __VERSION__
RECOMPILE_CYTHON = False
# Handle optional cython re-compilation (should be disabled by default for
# standard client build-installs)
ext = '.pyx' if RECOMPILE_CYTHON else '.c'
extensions = [Extension("auviewer.cylib", ["auviewer/cylib"+ext])]
if RECOMPILE_CYTHON:
from Cython.Build import cythonize
from numpy import get_include
extensions = cythonize(extensions, language_level=3)
def read(fn):
return open(os.path.join(os.path.dirname(__file__), fn)).read()
pkg_files = [elem.replace('auviewer/', '') for elem in glob('auviewer/static/**/*', recursive=True) if os.path.isfile(elem)]
# Workaround to import numpy without assuming it's initially installed.
# From https://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
setup(
name=NAME,
version=VERSION,
description='A general-purpose time series exploration & annotation tool.',
long_description='AUViewer is a tool for viewing & annotating time series data, usable as a standalone tool for individual use or as a web-based application served to many users for annotation.',
author='Gus Welter',
author_email='[email protected]',
maintainer='Gus Welter',
maintainer_email='[email protected]',
license='MIT',
entry_points={
'console_scripts': [
'auv=auviewer.serve:main'
]
},
cmdclass={'build_ext':build_ext},
ext_modules=extensions,
package_data={NAME: pkg_files},
install_requires=[
'audata>=1.0.3',
'bcrypt',
'email_validator',
'flask',
'flask-login',
'flask-mail',
'flask-sqlalchemy',
'flask-wtf',
'htmlmin',
'jsbeautifier',
'numpy>=1.19.5',
'pandas',
'passlib',
'psutil',
'pycryptodome',
'simplejson',
'sqlalchemy',
],
packages=find_packages(),
setup_requires=['numpy'],
python_requires='>=3.7',
url='https://github.com/autonlab/auviewer',
classifiers=[
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Scientific/Engineering",
],
)