~ubuntu-branches/ubuntu/karmic/calibre/karmic

« back to all changes in this revision

Viewing changes to installer/osx/freeze.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-30 12:49:41 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730124941-qjdsmri25zt8zocn
Tags: 0.6.3+dfsg-0ubuntu1
* New upstream release. Please see http://calibre.kovidgoyal.net/new_in_6/
  for the list of new features and changes.
* remove_postinstall.patch: Update for new version.
* build_debug.patch: Does not apply any more, disable for now. Might not be
  necessary any more.
* debian/copyright: Fix reference to versionless GPL.
* debian/rules: Drop obsolete dh_desktop call.
* debian/rules: Add workaround for weird Python 2.6 setuptools behaviour of
  putting compiled .so files into src/calibre/plugins/calibre/plugins
  instead of src/calibre/plugins.
* debian/rules: Drop hal fdi moving, new upstream version does not use hal
  any more. Drop hal dependency, too.
* debian/rules: Install udev rules into /lib/udev/rules.d.
* Add debian/calibre.preinst: Remove unmodified
  /etc/udev/rules.d/95-calibre.rules on upgrade.
* debian/control: Bump Python dependencies to 2.6, since upstream needs
  it now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
PYTHON = '/Library/Frameworks/Python.framework/Versions/Current/bin/python'
20
20
 
21
21
class BuildAPP(py2app):
22
 
    QT_PREFIX = '/Users/kovid/qt'
 
22
    QT_PREFIX = '/Volumes/sw/qt'
23
23
    LOADER_TEMPLATE = \
24
24
r'''#!/usr/bin/env python
25
25
import os, sys, glob
31
31
frameworks_dir = os.path.join(base_dir, 'Frameworks')
32
32
base_name = os.path.splitext(name)[0]
33
33
python = os.path.join(base_dir, 'MacOS', 'python')
 
34
qt_plugins = os.path.join(os.path.realpath(base_dir), 'MacOS')
34
35
loader_path = os.path.join(dirpath, base_name+'.py')
35
36
loader = open(loader_path, 'w')
36
37
site_packages = glob.glob(resources_dir+'/lib/python*/site-packages.zip')[0]
46
47
loader.close()
47
48
os.chmod(loader_path, 0700)
48
49
os.environ['PYTHONHOME']        = resources_dir
49
 
os.environ['FC_CONFIG_DIR']     = os.path.join(resources_dir, 'fonts')
 
50
os.environ['FONTCONFIG_PATH']   = os.path.join(resources_dir, 'fonts')
50
51
os.environ['MAGICK_HOME']       = os.path.join(frameworks_dir, 'ImageMagick')
51
52
os.environ['DYLD_LIBRARY_PATH'] = os.path.join(frameworks_dir, 'ImageMagick', 'lib')
 
53
os.environ['QT_PLUGIN_PATH']    = qt_plugins
52
54
args = [path, loader_path] + sys.argv[1:]
53
55
os.execv(python, args)
54
56
    '''
230
232
        all_functions = main_functions['console'] + main_functions['gui']
231
233
        print
232
234
        print 'Adding PoDoFo'
233
 
        pdf = glob.glob(os.path.expanduser('~/podofo/*.dylib'))[0]
 
235
        pdf = glob.glob(os.path.expanduser('/Volumes/sw/podofo/libpodofo*.dylib'))[0]
234
236
        shutil.copyfile(pdf, os.path.join(frameworks_dir, os.path.basename(pdf)))
235
237
 
236
238
 
254
256
        os.link(os.path.expanduser('~/pdftohtml/pdftohtml'), os.path.join(frameworks_dir, 'pdftohtml'))
255
257
        os.link(os.path.expanduser('~/pdftohtml/libpoppler.4.dylib'),
256
258
                os.path.join(frameworks_dir, 'libpoppler.4.dylib'))
257
 
        print 'Adding plugins'
258
 
        module_dir = os.path.join(resource_dir, 'lib', 'python2.6', 'lib-dynload')
259
259
        print 'Adding fontconfig'
260
260
        for f in glob.glob(os.path.expanduser('~/fontconfig-bundled/*')):
261
261
            dest = os.path.join(frameworks_dir, os.path.basename(f))
262
262
            if os.path.exists(dest):
263
263
                os.remove(dest)
264
 
            os.link(f, dest)
 
264
            shutil.copyfile(f, dest)
265
265
        dst = os.path.join(resource_dir, 'fonts')
266
266
        if os.path.exists(dst):
267
267
            shutil.rmtree(dst)
347
347
                                       'PyQt4.QtSvg', 'PyQt4.QtWebKit', 'commands',
348
348
                                       'mechanize', 'ClientForm', 'usbobserver',
349
349
                                       'genshi', 'calibre.web.feeds.recipes.*',
350
 
                                       'calibre.ebooks.lrf.any.*', 'calibre.ebooks.lrf.feeds.*',
 
350
                                       'calibre.gui2.convert.*',
351
351
                                       'keyword', 'codeop', 'pydoc', 'readline',
352
352
                                       'BeautifulSoup', 'calibre.ebooks.lrf.fonts.prs500.*',
353
353
                                       'dateutil', 'email.iterators',
354
354
                                       'email.generator',
 
355
                                       'calibre.ebooks.metadata.amazon',
355
356
                                       ],
356
357
                         'packages' : ['PIL', 'Authorization', 'lxml', 'dns'],
357
358
                         'excludes' : ['IPython'],