-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmkdist.py
executable file
·36 lines (28 loc) · 894 Bytes
/
mkdist.py
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
#!/usr/bin/env python3
import runpy
import sys
import os
import shutil
from edpkgutil.cleanDir import cleanDirectory
from edpkgutil.packageZip import packageZip
from edpkgutil.verifyPkg import generateFileSignature
from euddraft import version
buildDir = "build/exe.win32-3.4"
outputZipList = [
'latest/euddraft%s.zip' % version,
'latest/euddraft_latest.zip'
]
# ----
cleanDirectory(buildDir)
if sys.platform.startswith('win'):
runpy.run_module('setup')
else:
os.system('wine python setup.py')
shutil.copy('python34.dll', os.path.join(buildDir, 'python34.dll'))
for outputZipPath in outputZipList:
print('Packaging to %s' % outputZipPath)
packageZip(buildDir, outputZipPath, version)
# Digital signing!
signature = generateFileSignature(outputZipPath)
open(outputZipPath + '.sig', 'w').write(signature)
open('latest/VERSION', 'w').write(version)