mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 04:27:58 +01:00
fix ponysay-tool installation
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
7bbc0a0266
commit
298679fecf
3 changed files with 65 additions and 74 deletions
8
setup.py
8
setup.py
|
@ -558,17 +558,17 @@ class Setup():
|
|||
if hasponies and os.path.isdir(sharedir):
|
||||
for toolcommand in ('--dimensions', '--metadata'):
|
||||
if not self.free:
|
||||
print('%s, %s, %s' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
||||
Popen(['./src/ponysay-tool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
||||
print('%s, %s, %s' % ('./src/ponysaytool.py', toolcommand, sharedir))
|
||||
Popen(['./src/ponysaytool.py', toolcommand, sharedir], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
||||
else:
|
||||
params = ['./src/ponysay-tool.py', toolcommand, sharedir, '--']
|
||||
params = ['./src/ponysaytool.py', toolcommand, sharedir, '--']
|
||||
for sharefile in os.listdir(sharedir):
|
||||
if sharefile.endswith('.pony') and (sharefile != '.pony'):
|
||||
if not Setup.validateFreedom(sharedir + '/' + sharefile):
|
||||
print('Skipping metadata correction for %s/%s, did not pass validation process made by setup settings' % (sharedir, sharefile))
|
||||
else:
|
||||
params.append(sharefile)
|
||||
print('%s, %s, %s (with files)' % ('./src/ponysay-tool.py', toolcommand, sharedir))
|
||||
print('%s, %s, %s (with files)' % ('./src/ponysaytool.py', toolcommand, sharedir))
|
||||
Popen(params, stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
|
||||
|
||||
print()
|
||||
|
|
|
@ -56,8 +56,7 @@ if __name__ == '__main__':
|
|||
istool = istool[:istool.find(os.extsep)]
|
||||
istool = istool.endswith('-tool')
|
||||
if istool:
|
||||
from ponysaytool import *
|
||||
startponysaytool()
|
||||
from ponysaytool import * ## will start ponysay-tool
|
||||
exit(0)
|
||||
|
||||
isthink = sys.argv[0]
|
||||
|
|
|
@ -1183,10 +1183,6 @@ class TextArea(): # TODO support small screens
|
|||
|
||||
|
||||
|
||||
'''
|
||||
Start the program
|
||||
'''
|
||||
def startponysaytool():
|
||||
'''
|
||||
The user's home directory
|
||||
'''
|
||||
|
@ -1252,7 +1248,3 @@ def startponysaytool():
|
|||
|
||||
PonysayTool(args = opts)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
startponysaytool()
|
||||
|
||||
|
|
Loading…
Reference in a new issue