-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
56 lines (48 loc) · 1.66 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
from setuptools import setup, find_packages
import subprocess
import codecs
import sys
import os
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", package])
try:
import cv2
except ImportError:
install('opencv-python')
try:
import cython
except ImportError:
install('cython')
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
# note that scikit-learn must == 0.19 since flip classifiers were trained using this version
setup(
name='moseq2-extract',
author='Datta Lab',
description='To boldly go where no mouse has gone before',
version=get_version('moseq2_extract/__init__.py'),
platforms=['mac', 'unix'],
packages=find_packages(),
install_requires=['h5py==2.10.0', 'tqdm>=4.48.0', 'scipy==1.3.2', 'numpy==1.18.3', 'click==7.0',
'joblib==0.15.1', 'cytoolz==0.10.1', 'matplotlib==3.1.2', 'statsmodels==0.10.2',
'scikit-image==0.16.2', 'scikit-learn==0.20.3', 'opencv-python==4.1.2.30',
'ruamel.yaml==0.16.5'],
python_requires='>=3.6,<3.8',
entry_points={'console_scripts': ['moseq2-extract = moseq2_extract.cli:cli']},
extras_require={
"docs": [
"sphinx",
"sphinx-click",
"sphinx-rtd-theme",
],
},
)