-
Notifications
You must be signed in to change notification settings - Fork 211
/
setup.py
executable file
·120 lines (101 loc) · 3.22 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
#!/usr/bin/env python
"""
This file is part of PyGaze.
PyGaze is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PyGaze is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qnotero. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import sys
import glob
import pygaze
from setuptools import setup
print("Running setup for PyGaze version {}".format(pygaze.__version__))
def files(path):
return [
fname
for fname in glob.glob(path) if os.path.isfile(fname)
and not fname.endswith('.pyc')
]
def data_files():
"""
desc:
The OpenSesame plug-ins are installed as additional data. Under Windows,
there is no special folder to put these plug-ins in, so we skip this
step.
returns:
desc: A list of data files to include.
type: list
"""
return [
("share/opensesame_plugins/pygaze_init/resources/locale",
files("opensesame_plugins/pygaze_init/resources/locale/*")),
("share/opensesame_plugins/pygaze_init",
files("opensesame_plugins/pygaze_init/*")),
("share/opensesame_plugins/pygaze_drift_correct",
files("opensesame_plugins/pygaze_drift_correct/*")),
("share/opensesame_plugins/pygaze_log",
files("opensesame_plugins/pygaze_log/*")),
("share/opensesame_plugins/pygaze_start_recording",
files("opensesame_plugins/pygaze_start_recording/*")),
("share/opensesame_plugins/pygaze_stop_recording",
files("opensesame_plugins/pygaze_stop_recording/*")),
("share/opensesame_plugins/pygaze_wait",
files("opensesame_plugins/pygaze_wait/*"))
]
def get_readme():
if os.path.exists('README.md'):
with open('README.md') as fd:
return fd.read()
return 'No readme information'
setup(
name='pygaze' if 'bdist_deb' in sys.argv else u'python-pygaze',
python_requires=">=3",
version=pygaze.__version__,
description="A Python library for eye tracking",
long_description=get_readme(),
long_description_content_type='text/markdown',
author="Edwin Dalmaijer",
author_email="[email protected]",
url="http://www.pygaze.org/",
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3',
],
include_package_data=True,
package_data={
"pygaze._eyetracker.alea": ["*.dll"],
"pygaze._eyetracker.eyelogic": ["*.dll"]
},
packages=[
"pygaze",
"pygaze._display",
"pygaze._eyetracker",
"pygaze._eyetracker.alea",
"pygaze._eyetracker.eyelogic",
"pygaze._eyetracker.tobiiglasses",
"pygaze._joystick",
"pygaze._keyboard",
"pygaze._logfile",
"pygaze._misc",
"pygaze._mouse",
"pygaze._screen",
"pygaze._sound",
"pygaze._time",
"pygaze.plugins",
],
data_files=data_files()
)