diff --git a/installer/osx/freeze.py b/installer/osx/freeze.py index a6fd365869..7797e4276a 100644 --- a/installer/osx/freeze.py +++ b/installer/osx/freeze.py @@ -4,6 +4,7 @@ __copyright__ = '2008, Kovid Goyal ' ''' Create an OSX installer ''' import sys, re, os, shutil, subprocess, stat, glob, zipfile, plistlib +sys.path = sys.path[1:] l = {} exec open('setup.py').read() in l VERSION = l['VERSION'] @@ -210,7 +211,6 @@ os.execv(python, args) |stat.S_IWUSR|stat.S_IROTH|stat.S_IRGRP) - self.add_plugins() print 'Adding fontconfig' for f in glob.glob(os.path.expanduser('~/fontconfig-bundled/*')): dest = os.path.join(frameworks_dir, os.path.basename(f)) @@ -222,6 +222,8 @@ os.execv(python, args) shutil.rmtree(dst) shutil.copytree('/usr/local/etc/fonts', dst, symlinks=False) + self.add_plugins() + print print 'Adding IPython' dst = os.path.join(resource_dir, 'lib', 'python2.6', 'IPython') diff --git a/src/calibre/utils/ipc/launch.py b/src/calibre/utils/ipc/launch.py index 13ac7b23cb..dd7cd356f2 100644 --- a/src/calibre/utils/ipc/launch.py +++ b/src/calibre/utils/ipc/launch.py @@ -16,7 +16,7 @@ if iswindows: import win32process _windows_null_file = open(os.devnull, 'wb') -isnewosx = isosx and getattr(sys, 'new_app_bundle') +isnewosx = isosx and getattr(sys, 'new_app_bundle', False) class Worker(object): ''' diff --git a/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py b/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py index 8f8eaf706f..e2ab2539a0 100644 --- a/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py +++ b/src/calibre/web/feeds/recipes/recipe_telegraph_uk.py @@ -9,8 +9,8 @@ from calibre.web.feeds.news import BasicNewsRecipe class TelegraphUK(BasicNewsRecipe): title = u'Telegraph.co.uk' - __author__ = 'Darko Miletic and Sujata Raman' - description = 'News from United Kingdom' + __author__ = 'Darko Miletic' + description = 'News from United Kingdom' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True @@ -18,21 +18,21 @@ class TelegraphUK(BasicNewsRecipe): use_embedded_content = False extra_css = ''' - h1{font-family :Arial,Helvetica,sans-serif; font-size:large; color:#666666} - h2{font-family :Arial,Helvetica,sans-serif; font-size:small; color:#444444} - .story{font-family :Arial,Helvetica,sans-serif; font-size: x-small; color:#444444 } + h1{font-family :Arial,Helvetica,sans-serif; font-size:large; } + h2{font-family :Arial,Helvetica,sans-serif; font-size:x-small; color:#444444} + .story{font-family :Arial,Helvetica,sans-serif; font-size: x-small;} .byline{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;} a{color:#234B7B; } .imageExtras{color:#666666; font-family :Arial,Helvetica,sans-serif; font-size: xx-small;} ''' - - keep_only_tags = [ + + keep_only_tags = [ dict(name='div', attrs={'class':'storyHead'}) ,dict(name='div', attrs={'class':'story' }) - #,dict(name='div', attrs={'class':['slideshowHD gutterUnder',"twoThirds gutter","caption" ] }) + #,dict(name='div', attrs={'class':['slideshowHD gutterUnder',"twoThirds gutter","caption" ] }) ] remove_tags = [dict(name='div', attrs={'class':['related_links_inline',"imgindex","next","prev","gutterUnder"]})] - + feeds = [ (u'UK News' , u'http://www.telegraph.co.uk/news/uknews/rss' ) ,(u'World News' , u'http://www.telegraph.co.uk/news/worldnews/rss' ) @@ -47,12 +47,12 @@ class TelegraphUK(BasicNewsRecipe): ] def get_article_url(self, article): - + url = article.get('guid', None) - + if 'picture-galleries' in url or 'pictures' in url or 'picturegalleries' in url : url = None - + return url - +