-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
77 lines (65 loc) · 1.91 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
#!/usr/bin/env python
##
# This file is part of the Scratch Remote Sensor (SRS) Library project
#
# Copyright (C) 2012 Stefan Wendler <[email protected]>
#
# The SRS Library is free software; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# SRS Library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with the JSherpa firmware; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
##
'''
This file is part of the Scratch Remote Sensor Library project
'''
import os
import shutil
from distutils.core import setup
setup(name='scratch-pynetsense',
version='0.1',
description='Scratch Remote Sensor Library',
long_description='Client library for Python to use with the Scratch remote sensor protocol.',
author='Stefan Wendler',
author_email='[email protected]',
url='http://www.usherpa.org/',
license='LGPL 2.1',
packages=['scratch', 'scratch.wrappers'],
platforms=['Linux'],
package_dir = {'': 'src'}
)
# install wrapper scripts
base = "/usr/local/bin"
srsmon = "%s/srsmon" % base
srspid = "%s/srspid" % base
srsds = "%s/srsds" % base
scratch = "%s/scratch-pirs" % base
try:
shutil.copyfile("./bin/srsmon", srsmon)
os.chmod(srsmon, 0755)
except:
pass
try:
shutil.copyfile("./bin/srspid", srspid)
os.chmod(srspid, 0755)
except:
pass
try:
shutil.copyfile("./bin/srsds", srsds)
os.chmod(srsds, 0755)
except:
pass
try:
shutil.copyfile("./bin/scratch-pirs", scratch)
os.chmod(scratch, 0755)
except:
pass