From 6efedf5bbf55605888cc66bda0173894bc087538 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 16 Feb 2011 01:23:49 -0500 Subject: [PATCH] - Moved to GitHub (https://github.com/Pylons/translationstring). - Added tox.ini for testing purposes. --- .gitignore | 19 +++++++++++++++ CHANGES.txt | 7 ++++++ COPYRIGHT.txt | 2 +- README.txt | 9 ++++--- docs/.gitignore | 2 ++ docs/Makefile | 62 +++++++++++++++++++++++++++++++------------------ docs/conf.py | 12 ++++++---- docs/index.rst | 4 ++-- setup.py | 13 +++++++---- tox.ini | 26 +++++++++++++++++++++ 10 files changed, 118 insertions(+), 38 deletions(-) create mode 100644 .gitignore create mode 100644 docs/.gitignore create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53523c0 --- /dev/null +++ b/.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 diff --git a/CHANGES.txt b/CHANGES.txt index c4988fb..ef15942 100644 --- a/CHANGES.txt +++ b/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) ---------------- diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 4120e5f..3946ef8 100644 --- a/COPYRIGHT.txt +++ b/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 diff --git a/README.txt b/README.txt index 5214c6a..7509a24 100644 --- a/README.txt +++ b/README.txt @@ -1,8 +1,8 @@ translationstring ================= -A library used by various `Repoze `_ packages for -internationalization (i18n) duties related to translation. +A library used by various `Pylons Project `_ +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 @@ -12,6 +12,5 @@ depend on `Babel `_, 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 -`_ 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. diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..3a5087f --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +_themes/ +_build/ diff --git a/docs/Makefile b/docs/Makefile index e996997..3d706d1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 9f9f38f..e1bf4a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -49,7 +49,7 @@ # General substitutions. project = 'translationstring' -copyright = '2010, Repoze Developers ' +copyright = '2011, Agendaless Consulting ' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. @@ -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 # " v documentation". @@ -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. @@ -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 diff --git a/docs/index.rst b/docs/index.rst index 38b4d78..97f2428 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,8 +1,8 @@ translationstring ================= -A library used by various `Repoze `_ packages for -internationalization (i18n) duties. +A library used by various `Pylons Project `_ +packages for internationalization (i18n) duties. This package provides a :term:`translation string` class, a :term:`translation string factory` class, translation and diff --git a/setup.py b/setup.py index 13a92a4..a6c25e9 100644 --- a/setup.py +++ b/setup.py @@ -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 = [] @@ -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, diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..1a12fd1 --- /dev/null +++ b/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. +