Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Added tox.ini for testing purposes.
  • Loading branch information
mcdonc committed Feb 16, 2011
1 parent 1ed95aa commit 6efedf5
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 38 deletions.
19 changes: 19 additions & 0 deletions .gitignore
@@ -0,0 +1,19 @@
*.egg
*.egg-info
*.pyc
*$py.class
*.pt.py
*.txt.py
*~
.coverage
.tox/
nosetests.xml
env26/
env25/
env24/
env27/
jyenv/
pypyenv/
build/
dist/
translationstring/coverage.xml
7 changes: 7 additions & 0 deletions CHANGES.txt
@@ -1,6 +1,13 @@
translationstring
=================

Next release
------------

- Moved to GitHub (https://github.com/Pylons/translationstring).

- Added tox.ini for testing purposes.

0.3 (06-25-2010)
----------------

Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
@@ -1,3 +1,3 @@
Copyright (c) 2010 Agendaless Consulting and Contributors.
Copyright (c) 2011 Agendaless Consulting and Contributors.
(http://www.agendaless.com), All Rights Reserved

9 changes: 4 additions & 5 deletions README.txt
@@ -1,8 +1,8 @@
translationstring
=================

A library used by various `Repoze <http://repoze.org>`_ packages for
internationalization (i18n) duties related to translation.
A library used by various `Pylons Project <http://pylonsproject.org>`_
packages for internationalization (i18n) duties related to translation.

This package provides a *translation string* class, a *translation
string factory* class, translation and pluralization primitives, and a
Expand All @@ -12,6 +12,5 @@ depend on `Babel <http://babel.edgewall.org>`_, but its translation
and pluralization services are meant to work best when provided with
an instance of the ``babel.support.Translations`` class.

Please see `http://docs.repoze.org/translationstring
<http://docs.repoze.org/translationstring>`_ or the ``docs/index.rst``
file in this package for the documentation.
Please see http://docs.pylonsproject.org/translationstring/dev/ or the
``docs/index.rst`` file in this package for the documentation.
2 changes: 2 additions & 0 deletions docs/.gitignore
@@ -0,0 +1,2 @@
_themes/
_build/
62 changes: 40 additions & 22 deletions docs/Makefile
Expand Up @@ -9,7 +9,7 @@ PAPER =
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d .build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html web pickle htmlhelp latex changes linkcheck

Expand All @@ -23,48 +23,66 @@ help:
@echo " linkcheck to check all external links for integrity"

clean:
-rm -rf .build/*
-rm -rf _build/*

html:
mkdir -p .build/html .build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) .build/html
html: _themes/
mkdir -p _build/html _build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in .build/html."
@echo "Build finished. The HTML pages are in _build/html."

text:
mkdir -p _build/text _build/doctrees
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) _build/text
@echo
@echo "Build finished. The HTML pages are in _build/text."

pickle:
mkdir -p .build/pickle .build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) .build/pickle
mkdir -p _build/pickle _build/doctrees
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
@echo
@echo "Build finished; now you can process the pickle files or run"
@echo " sphinx-web .build/pickle"
@echo " sphinx-web _build/pickle"
@echo "to start the sphinx-web server."

web: pickle

htmlhelp:
mkdir -p .build/htmlhelp .build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) .build/htmlhelp
htmlhelp: _themes
mkdir -p _build/htmlhelp _build/doctrees
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in .build/htmlhelp."
".hhp project file in _build/htmlhelp."

latex:
mkdir -p .build/latex .build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) .build/latex
mkdir -p _build/latex _build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
cp _static/*.png _build/latex
./convert_images.sh
cp _static/latex-warning.png _build/latex
cp _static/latex-note.png _build/latex
@echo
@echo "Build finished; the LaTeX files are in .build/latex."
@echo "Build finished; the LaTeX files are in _build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."

changes:
mkdir -p .build/changes .build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) .build/changes
mkdir -p _build/changes _build/doctrees
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
@echo
@echo "The overview file is in .build/changes."
@echo "The overview file is in _build/changes."

linkcheck:
mkdir -p .build/linkcheck .build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) .build/linkcheck
mkdir -p _build/linkcheck _build/doctrees
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in .build/linkcheck/output.txt."
"or in _build/linkcheck/output.txt."

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub
@echo
@echo "Build finished. The epub file is in _build/epub."

_themes:
git clone git://github.com/Pylons/pylons_sphinx_theme.git _themes
12 changes: 8 additions & 4 deletions docs/conf.py
Expand Up @@ -49,7 +49,7 @@

# General substitutions.
project = 'translationstring'
copyright = '2010, Repoze Developers <repoze-dev@lists.repoze.org>'
copyright = '2011, Agendaless Consulting <pylons-discuss@googlegroups.com>'

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
Expand Down Expand Up @@ -94,10 +94,14 @@
# Options for HTML output
# -----------------------

sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'pylons'

# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = 'repoze.css'
#html_style = 'pylons.css'

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -120,7 +124,7 @@
# here, relative to this directory. They are copied after the builtin
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".
html_static_path = ['.static']
#html_static_path = ['.static']

# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
Expand Down Expand Up @@ -176,7 +180,7 @@
# author, document class [howto/manual]).
latex_documents = [
('index', 'translationstring.tex', 'translationstring Documentation',
'Repoze Developers', 'manual'),
'Pylons Developers', 'manual'),
]

# The name of an image file (relative to this directory) to place at the
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
@@ -1,8 +1,8 @@
translationstring
=================

A library used by various `Repoze <http://repoze.org>`_ packages for
internationalization (i18n) duties.
A library used by various `Pylons Project <http://pylonsproject.org>`_
packages for internationalization (i18n) duties.

This package provides a :term:`translation string` class, a
:term:`translation string factory` class, translation and
Expand Down
13 changes: 9 additions & 4 deletions setup.py
Expand Up @@ -4,8 +4,13 @@
from setuptools import find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()

try:
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
except:
README = ''
CHANGES = ''

requires = []

Expand All @@ -22,8 +27,8 @@
],
keywords='i18n l10n internationalization localization gettext chameleon',
author="Chris McDonough, Agendaless Consulting",
author_email="repoze-dev@lists.repoze.org",
url="http://www.repoze.org",
author_email="pylons-discuss@googlegroups.com",
url="http://pylonsproject.org",
license="BSD-like (http://repoze.org/license.html)",
packages=find_packages(),
include_package_data=True,
Expand Down
26 changes: 26 additions & 0 deletions tox.ini
@@ -0,0 +1,26 @@
[tox]
envlist =
py24,py25,py26,py27,jython,pypy,cover

[testenv]
commands =
python setup.py test -q
deps =
Babel

[testenv:cover]
basepython =
python2.6
commands =
python setup.py nosetests --with-xunit --with-xcoverage
deps =
Babel
nose
coverage<3.4
nosexcover

# we separate coverage into its own testenv because a) "last run wins" wrt
# cobertura jenkins reporting and b) pypy and jython can't handle any
# combination of versions of coverage and nosexcover that i can find.
# coverage <3.4 is required by nosexcover 1.0.4.

0 comments on commit 6efedf5

Please sign in to comment.