mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-22 04:27:58 +01:00
alternative 1 for issue #155, support for python<3.2
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
b0b41976c3
commit
992e80d400
1 changed files with 5 additions and 1 deletions
6
setup.py
6
setup.py
|
@ -431,9 +431,13 @@ class Setup():
|
||||||
if fileout is not None: fileout.close()
|
if fileout is not None: fileout.close()
|
||||||
if filein is not None: filein .close()
|
if filein is not None: filein .close()
|
||||||
print('Creating uncompressed zip file ponysay.zip with files from src: ' + ' '.join(ponysaysrc))
|
print('Creating uncompressed zip file ponysay.zip with files from src: ' + ' '.join(ponysaysrc))
|
||||||
with ZipFile('ponysay.zip', 'w') as myzip:
|
myzip = None
|
||||||
|
try:
|
||||||
|
myzip = ZipFile('ponysay.zip', 'w')
|
||||||
for src in ponysaysrc:
|
for src in ponysaysrc:
|
||||||
myzip.write('src/%s.install' % src, src)
|
myzip.write('src/%s.install' % src, src)
|
||||||
|
finally:
|
||||||
|
myzip.close()
|
||||||
os.chmod('ponysay.zip', 0o755)
|
os.chmod('ponysay.zip', 0o755)
|
||||||
try:
|
try:
|
||||||
fileout = open('ponysay.install', 'wb+')
|
fileout = open('ponysay.install', 'wb+')
|
||||||
|
|
Loading…
Reference in a new issue