-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
executable file
·57 lines (44 loc) · 1.59 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
#!/usr/bin/env python
import os
from setuptools import setup
from distutils.spawn import find_executable
import subprocess as sub
# If installing from GitHub, get the git hash for the current KLibs commit
commit_file = os.path.join('klibs', 'resources', 'current_commit.txt')
source_install = False
if not os.path.isfile(commit_file):
source_install = True
if not find_executable('git'):
e = "You must have Git installed in order to install KLibs from GitHub"
raise RuntimeError(e)
cmd = 'git rev-parse --verify HEAD'.split(' ')
commit = sub.check_output(cmd, universal_newlines=True).strip()
with open(commit_file, 'w+') as f:
f.write(commit)
install_packages = ['klibs']
setup(
name='KLibs',
version='0.7.7b1',
description='A framework for building psychological experiments in Python',
author='Jonathan Mulle & Austin Hurst',
author_email='[email protected]',
url='http://github.com/a-hurst/klibs',
packages=['klibs', 'klibs/KLGraphics', 'klibs/KLEyeTracking'],
include_package_data=True,
entry_points = {'console_scripts': ['klibs = klibs.__main__:klibs_main']},
python_requires='>=3.7',
install_requires=[
'numpy>=1.8.0rc1',
'pysdl2>=0.9.7',
'pysdl2-dll>=2.0.10',
'Pillow>=3.0.0,!=5.1.0',
'aggdraw>1.2.0',
'PyOpenGL>=3.1.0'
],
extras_require={
'AudioResponse': ['PyAudio>=0.2.9']
}
)
# Remove current_commit.txt after install to avoid messing with git
if source_install and os.path.exists(commit_file):
os.remove(commit_file)