From: Armin Ronacher Date: Sat, 27 Jul 2013 10:43:13 +0000 (+0200) Subject: Make tests work without installation X-Git-Tag: 1.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af9834dd14df039dee45a86a94ec17f3a8bc8f44;p=thirdparty%2Fbabel.git Make tests work without installation --- diff --git a/babel/messages/extract.py b/babel/messages/extract.py index 44b1eb38..2f8084af 100644 --- a/babel/messages/extract.py +++ b/babel/messages/extract.py @@ -252,7 +252,11 @@ def extract(method, fileobj, keywords=DEFAULT_KEYWORDS, comment_tags=(), # if pkg_resources is not available or no usable egg-info was found # (see #230), we resort to looking up the builtin extractors # directly - builtin = {'ignore': extract_nothing, 'python': extract_python} + builtin = { + 'ignore': extract_nothing, + 'python': extract_python, + 'javascript': extract_javascript + } func = builtin.get(method) if func is None: raise ValueError('Unknown extraction method %r' % method) diff --git a/setup.py b/setup.py index 301e7a7a..e983658f 100755 --- a/setup.py +++ b/setup.py @@ -65,6 +65,10 @@ setup( zip_safe=False, + # Note when adding extractors: builtin extractors we also want to + # work if packages are not installed to simplify testing. If you + # add an extractor here also manually add it to the "extract" + # function in babel.messages.extract. entry_points=""" [console_scripts] pybabel = babel.messages.frontend:main