mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 04:27:58 +01:00
setup fixes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
db23f940c2
commit
5e77bd6224
1 changed files with 11 additions and 12 deletions
23
setup.py
23
setup.py
|
@ -433,7 +433,7 @@ class Setup():
|
||||||
os.system('zip -0 ../ponysay.zip ' + ' '.join(ponysaysrc)) # use not compress, prefer speed
|
os.system('zip -0 ../ponysay.zip ' + ' '.join(ponysaysrc)) # use not compress, prefer speed
|
||||||
finally:
|
finally:
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
os.chmod('../ponysay.zip', 0o755)
|
os.chmod('ponysay.zip', 0o755)
|
||||||
try:
|
try:
|
||||||
fileout = open('ponysay.install', 'wb+')
|
fileout = open('ponysay.install', 'wb+')
|
||||||
filein = open('src/%s' % src, 'rb')
|
filein = open('src/%s' % src, 'rb')
|
||||||
|
@ -555,19 +555,18 @@ class Setup():
|
||||||
|
|
||||||
for sharedir in [sharedir[0] for sharedir in sharedirs]: # TODO make this an opt-out option
|
for sharedir in [sharedir[0] for sharedir in sharedirs]: # TODO make this an opt-out option
|
||||||
if os.path.isdir(sharedir):
|
if os.path.isdir(sharedir):
|
||||||
if not self.free:
|
for toolcommand in ('--dimensions', '--metadata'):
|
||||||
for toolcommand in ('--dimensions', '--metadata'):
|
if not self.free:
|
||||||
print('%s, %s, %s' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
print('%s, %s, %s' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
||||||
Popen(['./src/ponysay-tool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
Popen(['./src/ponysay-tool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
||||||
else:
|
else:
|
||||||
params = ['./src/ponysay-tool.py', toolcommand, sharedir, '--']
|
params = ['./src/ponysay-tool.py', toolcommand, sharedir, '--']
|
||||||
for sharefile in os.listdir():
|
for sharefile in os.listdir(sharedir):
|
||||||
if sharefile.endswith('.pony') and (sharefile != '.pony'):
|
if sharefile.endswith('.pony') and (sharefile != '.pony'):
|
||||||
if not Setup.validateFreedom(sharedir + '/' + sharefile):
|
if not Setup.validateFreedom(sharedir + '/' + sharefile):
|
||||||
print('Skipping metadata correction for %s/%s, did not pass validation process made by setup settings' % (sharedir, sharefile))
|
print('Skipping metadata correction for %s/%s, did not pass validation process made by setup settings' % (sharedir, sharefile))
|
||||||
else:
|
else:
|
||||||
params.append(sharefile)
|
params.append(sharefile)
|
||||||
for toolcommand in ('--dimensions', '--metadata'):
|
|
||||||
print('%s, %s, %s (with files)' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
print('%s, %s, %s (with files)' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
||||||
Popen(params, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
Popen(params, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue