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
|
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -49,6 +49,7 @@
python %s/site-packages/gerbmerge/gerbmerge.py $*
""" % DestLib)
fid.close()
+ os.chmod('misc/gerbmerge', 0755)
dist=setup (name = "gerbmerge",
license = "GPL",
@@ -80,39 +81,11 @@
(BinDir, BinFiles) ]
)
-do_fix_perms = 0
if sys.platform != "win32":
for cmd in dist.commands:
if cmd[:7]=='install':
- do_fix_perms = 1
break
-if do_fix_perms:
- # Ensure package files and misc/help files are world readable-searchable.
- # Shouldn't Distutils do this for us?
- print 'Setting permissions on installed files...',
- try:
- def fixperms(arg, dirname, names):
- os.chmod(dirname, 0755)
- for name in names:
- fullname = os.path.join(dirname, name)
- if os.access(fullname, os.X_OK):
- os.chmod(fullname, 0755)
- else:
- os.chmod(fullname, 0644)
-
- os.path.walk(DestDir, fixperms, 1)
- os.path.walk(os.path.join(DestLib, 'site-packages/gerbmerge'), fixperms, 1)
-
- os.chmod(os.path.join(BinDir, 'gerbmerge'), 0755)
- print 'done'
- except:
- print 'FAILED'
- print
- print '*** Please verify that the installed files have correct permissions. On'
- print "*** systems without permission flags, you don't need to"
- print '*** worry about it.'
-
if cmd[:7]=='install':
print
print '******** Installation Complete ******** '
|