-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathsetup.py
executable file
·60 lines (51 loc) · 1.68 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
#!/usr/bin/env python
from setuptools import setup
from setuptools import find_packages
from os.path import join as opj
from os.path import dirname
def get_version():
"""Load version without any imports
"""
with open(opj(dirname(__file__), 'remodnav', '__init__.py')) as f:
version_lines = list(filter(lambda x: x.startswith('__version__'), f))
assert (len(version_lines) == 1)
return version_lines[0].split('=')[1].strip(" '\"\t\n")
# extension version
version = get_version()
try:
import pypandoc
README = opj(dirname(__file__), 'README.md')
long_description = pypandoc.convert_file(README, 'rst')
except (ImportError, OSError) as exc:
print(
"WARNING: pypandoc failed to import or threw an error while "
"converting README.md to RST: "
"%r .md version will be used as is" % exc
)
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="remodnav",
author="The REMoDNaV Team and Contributors",
author_email="michael.hanke@gmail.com",
version=version,
description="robust eye movement detection for natural viewing",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/psychoinformatics-de/remodnav",
packages=[pkg for pkg in find_packages('.') if pkg.startswith('remodnav')],
install_requires=[
'numpy',
'scipy',
'statsmodels',
'matplotlib',
],
extras_require={
'devel-docs': [
# for converting README.md -> .rst for long description
'pypandoc',
]},
entry_points = {
'console_scripts': ['remodnav=remodnav:main'],
},
)