mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 07:06:20 +01:00
DRYer
This commit is contained in:
parent
e723ec4c47
commit
ea2816dc85
2 changed files with 6 additions and 5 deletions
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
import os, shutil, subprocess, glob, tempfile, json, time, filecmp, atexit, sys
|
||||
|
||||
from setup import Command, __version__, require_clean_git, require_git_master, installer_name
|
||||
from setup import Command, __version__, require_clean_git, require_git_master
|
||||
from setup.upload import installers
|
||||
from setup.parallel_build import parallel_build
|
||||
|
||||
class Stage1(Command):
|
||||
|
|
@ -98,8 +99,7 @@ def workers_running():
|
|||
for p in sorted(processes, key=lambda p:p.duration):
|
||||
self.info('Built %s in %d minutes and %d seconds' % (p.bname, p.duration // 60, p.duration % 60))
|
||||
|
||||
for ext, is64bit in {'msi': True, 'msi':False, 'exe':False, 'dmg':True, 'txz':True, 'txz':False}.iteritems():
|
||||
installer = installer_name(ext, is64bit)
|
||||
for installer in installers(include_source=False):
|
||||
if not os.path.exists(self.j(self.d(self.SRC), installer)):
|
||||
raise SystemExit('The installer %s does not exist' % os.path.basename(installer))
|
||||
|
||||
|
|
|
|||
|
|
@ -25,11 +25,12 @@
|
|||
STAGING_USER = 'root'
|
||||
STAGING_DIR = '/root/staging'
|
||||
|
||||
def installers():
|
||||
def installers(include_source=True):
|
||||
installers = list(map(installer_name, ('dmg', 'msi', 'txz')))
|
||||
installers.append(installer_name('txz', is64bit=True))
|
||||
installers.append(installer_name('msi', is64bit=True))
|
||||
installers.insert(0, 'dist/%s-%s.tar.xz'%(__appname__, __version__))
|
||||
if include_source:
|
||||
installers.insert(0, 'dist/%s-%s.tar.xz'%(__appname__, __version__))
|
||||
installers.append('dist/%s-portable-installer-%s.exe'%(__appname__, __version__))
|
||||
return installers
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue