diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | MANIFEST.in | 10 | ||||
-rw-r--r-- | Makefile | 26 | ||||
-rw-r--r-- | babel/messages/extract.py | 6 | ||||
-rw-r--r-- | setup.cfg | 1 | ||||
-rwxr-xr-x | setup.py | 4 | ||||
-rw-r--r-- | tox.ini | 3 |
8 files changed, 40 insertions, 16 deletions
@@ -8,6 +8,7 @@ build dist .DS_Store .tox +test-env **/__pycache__ babel/global.dat tests/messages/data/project/i18n/long_messages.pot @@ -10,10 +10,13 @@ Version 2.0 Version 1.2 ----------- -(bugfix release, release date to be decided) +(bugfix release, released on July 27th 2013) - Included all tests in the tarball. Previously the include skipped past recursive folders. +- Changed how tests are invoked and added separate standalone + test command. This simplifies testing of the package for + linux distributors. Version 1.1 ----------- diff --git a/MANIFEST.in b/MANIFEST.in index a089e6f..a53a51f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,10 @@ +include Makefile CHANGES LICENSE AUTHORS +include conftest.py tox.ini include babel/global.dat include babel/localedata/*.dat -include doc/api/*.* -include doc/*.html +recursive-include docs * +recursive-exclude docs/_build * include scripts/* -recursive-include tests/* +recursive-include tests * +recursive-exclude tests *.pyc +recursive-exclude tests *.pyo @@ -1,10 +1,21 @@ test: import-cldr - @py.test + @py.test tests -clean: clean-cldr clean-pyc +test-env: + @virtualenv test-env + @test-env/bin/pip install pytest + @test-env/bin/pip install --editable . + +clean-test-env: + @rm -rf test-env + +standalone-test: import-cldr test-env + @test-env/bin/py.test tests + +clean: clean-cldr clean-pyc clean-test-env import-cldr: - @./scripts/download_import_cldr.py + @python scripts/download_import_cldr.py clean-cldr: @rm babel/localedata/*.dat @@ -17,9 +28,8 @@ clean-pyc: develop: @pip install --editable . -tox-test: - @PYTHONDONTWRITEBYTECODE= tox - @$(MAKE) clean-pyc +tox-test: import-cldr + @tox upload-docs: $(MAKE) -C docs html dirhtml latex @@ -29,7 +39,7 @@ upload-docs: rsync -a docs/_build/latex/Babel.pdf pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.pdf rsync -a docs/_build/babel-docs.zip pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.zip -release: +release: import-cldr python scripts/make-release.py -.PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean release upload-docs +.PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean release upload-docs clean-test-env standalone-test diff --git a/babel/messages/extract.py b/babel/messages/extract.py index 44b1eb3..2f8084a 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) @@ -1,5 +1,4 @@ [egg_info] -tag_build = dev tag_date = true [aliases] @@ -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 @@ -3,6 +3,5 @@ envlist = py26, py27, pypy, py33 [testenv] deps = - pytz pytest -commands = py.test [] +commands = py.test tests |