From 09f00cd8224e048d94d28dd50c7d42fc88f6d321 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Aug 2009 14:32:54 -0600 Subject: [PATCH] IGN:... --- installer/linux/freeze.py | 2 +- src/calibre/library/save_to_disk.py | 2 ++ upload.py | 45 +++++++++++------------------ 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/installer/linux/freeze.py b/installer/linux/freeze.py index ff58f07dfc..47e477ea4e 100644 --- a/installer/linux/freeze.py +++ b/installer/linux/freeze.py @@ -52,7 +52,7 @@ def freeze(): '/usr/lib/libxslt.so.1', '/usr/lib/libgthread-2.0.so.0', '/usr/lib/gcc/***-pc-linux-gnu/4.4.1/libstdc++.so.6'.replace('***', - arch).replace('i686', 'i486'), + arch), '/usr/lib/libpng12.so.0', '/usr/lib/libexslt.so.0', '/usr/lib/libMagickWand.so', diff --git a/src/calibre/library/save_to_disk.py b/src/calibre/library/save_to_disk.py index c404bd9223..7a6fb50ab1 100644 --- a/src/calibre/library/save_to_disk.py +++ b/src/calibre/library/save_to_disk.py @@ -97,6 +97,8 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250, format_args['author_sort'] = mi.author_sort if mi.tags: format_args['tags'] = mi.format_tags() + if format_args['tags'].startswith('/'): + format_args['tags'] = format_args['tags'][1:] if mi.series: format_args['series'] = mi.series if mi.series_index is not None: diff --git a/upload.py b/upload.py index fcf8fd9911..a7146008de 100644 --- a/upload.py +++ b/upload.py @@ -487,7 +487,10 @@ def installer_name(ext): ans = ans.replace('i686', 'x86_64') return ans -def _build_linux(): +class build_linux64(OptionlessCommand): + description = 'Build linux 64bit installer' + + def run(self): installer = installer_name('tar.bz2') locals = {} exec open('installer/linux/freeze.py') in locals @@ -496,12 +499,6 @@ def _build_linux(): raise Exception('Failed to build installer '+installer) return os.path.basename(installer) -class build_linux64(OptionlessCommand): - description = 'Build linux 64bit installer' - - def run(self): - return _build_linux() - class VMInstaller(OptionlessCommand): user_options = [('dont-shutdown', 'd', 'Dont shutdown VM after build')] @@ -518,7 +515,7 @@ class VMInstaller(OptionlessCommand): rsync -avz --exclude src/calibre/plugins \ --exclude calibre/src/calibre.egg-info --exclude docs \ --exclude .bzr --exclude .build --exclude build --exclude dist \ - --exclude "*.pyc" --exclude "*.pyo" \ + --exclude "*.pyc" --exclude "*.pyo" --exclude "*.swp" --exclude "*.swo" \ rsync://%(host)s/work/%(project)s . && \ cd %(project)s && \ %%s && \ @@ -550,7 +547,7 @@ class VMInstaller(OptionlessCommand): def run_vm(self): - self.__p = Popen(self.VM) + self.__p = Popen([self.VM]) def start_vm(self, ssh_host, build_script, sleep=75): self.run_vm() @@ -576,28 +573,21 @@ class KVMInstaller(VMInstaller): -class build_linux32(KVMInstaller): +class build_linux32(VMInstaller): description = 'Build linux 32bit installer' - VM = '/vmware/bin/linux_build' - - def run_vm(self): - self.__p = Popen('/vmware/bin/linux_build') + VM = '/vmware/bin/gentoo32_build' def run(self): - if is64bit: - installer = installer_name('tar.bz2').replace('x86_64', 'i686') - self.start_vm('linux_build', ('python setup.py build_ext', - 'python', 'setup.py build_linux32')) - check_call(('scp', 'linux_build:build/calibre/dist/*.tar.bz2', 'dist')) - if not os.path.exists(installer): - raise Exception('Failed to build installer '+installer) - if not self.dont_shutdown: - Popen(('ssh', 'linux_build', 'sudo', '/sbin/poweroff')) - return os.path.basename(installer) - else: - return _build_linux() - + installer = installer_name('tar.bz2').replace('x86_64', 'i686') + self.start_vm('gentoo32_build', ('sudo python setup.py develop && sudo chown -R kovid:users *', + 'python', 'installer/linux/freeze.py')) + check_call(('scp', 'gentoo32_build:build/calibre/dist/*.dmg', 'dist')) + if not os.path.exists(installer): + raise Exception('Failed to build installer '+installer) + if not self.dont_shutdown: + Popen(('ssh', 'gentoo32_build', 'sudo', '/sbin/poweroff')) + return os.path.basename(installer) class build_windows(VMInstaller): description = 'Build windows installer' @@ -641,7 +631,6 @@ class build_osx(VMInstaller): def run(self): installer = installer_name('dmg') python = '/Library/Frameworks/Python.framework/Versions/Current/bin/python' - self.start_vmware() self.start_vm('tiger_build', ('sudo %s setup.py develop'%python, python, 'installer/osx/freeze.py')) check_call(('scp', 'tiger_build:build/calibre/dist/*.dmg', 'dist'))