[tox]
envlist =
        {py27,py36}-django{18,19,110,111},
        gettext,docs

skipsdist = True


[testenv]
changedir = testproject
commands =
        python manage.py test rosetta

setenv =
        PYTHONDONTWRITEBYTECODE=1

deps =
        django18: Django==1.8.11
        django19: Django==1.9.4
        django110: Django==1.10
        django111: Django==1.11

        py27-django{17,18,19,110,111}: python-memcached
        py36-django{17,18,19,110,111}: python3-memcached
        # py27-django18: pudb
        requests
        polib>=1.0.6
        microsofttranslator>=0.7
        six
        goslate
        vcrpy

[testenv:gettext]
changedir = rosetta/locale/
whitelist_externals =
      msgfmt

commands =
      msgfmt -c -o cs/LC_MESSAGES/django.mo cs/LC_MESSAGES/django.po
      msgfmt -c -o de/LC_MESSAGES/django.mo de/LC_MESSAGES/django.po
      msgfmt -c -o es/LC_MESSAGES/django.mo es/LC_MESSAGES/django.po
      msgfmt -c -o fa/LC_MESSAGES/django.mo fa/LC_MESSAGES/django.po
      msgfmt -c -o fr/LC_MESSAGES/django.mo fr/LC_MESSAGES/django.po
      msgfmt -c -o hu/LC_MESSAGES/django.mo hu/LC_MESSAGES/django.po
      msgfmt -c -o it/LC_MESSAGES/django.mo it/LC_MESSAGES/django.po
      msgfmt -c -o nl/LC_MESSAGES/django.mo nl/LC_MESSAGES/django.po
      msgfmt -c -o pl/LC_MESSAGES/django.mo pl/LC_MESSAGES/django.po
      msgfmt -c -o ru/LC_MESSAGES/django.mo ru/LC_MESSAGES/django.po
      msgfmt -c -o tr/LC_MESSAGES/django.mo tr/LC_MESSAGES/django.po
      msgfmt -c -o uk/LC_MESSAGES/django.mo uk/LC_MESSAGES/django.po

[testenv:docs]
deps = sphinx
changedir = docs
commands=
        sphinx-build -W -b html . _build/html
