Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 338875
Collapse All | Expand All

(-)a/setup.py (-28 / +1 lines)
Lines 49-54 Link Here
49
python %s/site-packages/gerbmerge/gerbmerge.py $*
49
python %s/site-packages/gerbmerge/gerbmerge.py $*
50
  """ % DestLib)
50
  """ % DestLib)
51
  fid.close()
51
  fid.close()
52
  os.chmod('misc/gerbmerge', 0755)
52
53
53
dist=setup (name = "gerbmerge",
54
dist=setup (name = "gerbmerge",
54
       license = "GPL",
55
       license = "GPL",
Lines 80-118 Link Here
80
                      (BinDir, BinFiles) ]
81
                      (BinDir, BinFiles) ]
81
)
82
)
82
83
83
do_fix_perms = 0
84
if sys.platform != "win32":
84
if sys.platform != "win32":
85
  for cmd in dist.commands:
85
  for cmd in dist.commands:
86
   if cmd[:7]=='install':
86
   if cmd[:7]=='install':
87
    do_fix_perms = 1
88
    break
87
    break
89
88
90
if do_fix_perms:
91
  # Ensure package files and misc/help files are world readable-searchable.
92
  # Shouldn't Distutils do this for us?
93
  print 'Setting permissions on installed files...',
94
  try:
95
    def fixperms(arg, dirname, names):
96
      os.chmod(dirname, 0755)
97
      for name in names:
98
        fullname = os.path.join(dirname, name)
99
        if os.access(fullname, os.X_OK):
100
          os.chmod(fullname, 0755)
101
        else:
102
          os.chmod(fullname, 0644)
103
104
    os.path.walk(DestDir, fixperms, 1)
105
    os.path.walk(os.path.join(DestLib, 'site-packages/gerbmerge'), fixperms, 1)
106
107
    os.chmod(os.path.join(BinDir, 'gerbmerge'), 0755)
108
    print 'done'
109
  except:
110
    print 'FAILED'
111
    print
112
    print '*** Please verify that the installed files have correct permissions. On'
113
    print "*** systems without permission flags, you don't need to"
114
    print '*** worry about it.' 
115
116
if cmd[:7]=='install':
89
if cmd[:7]=='install':
117
  print
90
  print
118
  print '******** Installation Complete ******** '
91
  print '******** Installation Complete ******** '

Return to bug 338875