summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CHANGES5
-rw-r--r--MANIFEST.in10
-rw-r--r--Makefile26
-rw-r--r--babel/messages/extract.py6
-rw-r--r--setup.cfg1
-rwxr-xr-xsetup.py4
-rw-r--r--tox.ini3
8 files changed, 40 insertions, 16 deletions
diff --git a/.gitignore b/.gitignore
index af3746c..7effb2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@ build
dist
.DS_Store
.tox
+test-env
**/__pycache__
babel/global.dat
tests/messages/data/project/i18n/long_messages.pot
diff --git a/CHANGES b/CHANGES
index 9810079..08bbe2a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/Makefile b/Makefile
index 5b0b703..f2cdc96 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/setup.cfg b/setup.cfg
index 144a3eb..ffe7c8f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,4 @@
[egg_info]
-tag_build = dev
tag_date = true
[aliases]
diff --git a/setup.py b/setup.py
index 5de2f73..c7b39c3 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
diff --git a/tox.ini b/tox.ini
index 0059112..52d8df9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,6 +3,5 @@ envlist = py26, py27, pypy, py33
[testenv]
deps =
- pytz
pytest
-commands = py.test []
+commands = py.test tests