summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen2014-03-06 03:25:09 (GMT)
committereroen2014-03-06 03:28:30 (GMT)
commitbd338aa28f41fcfa1e802cdedc5acf50b1cd1f04 (patch)
treecaba1981bd7784ce32e9cd766f77469a07d6c1ea
parent856b43de7d783860d5e51ef0282094a49c15a326 (diff)
downloaderoen-overlay-bd338aa28f41fcfa1e802cdedc5acf50b1cd1f04.tar.gz
eroen-overlay-bd338aa28f41fcfa1e802cdedc5acf50b1cd1f04.tar.bz2
eroen-overlay-bd338aa28f41fcfa1e802cdedc5acf50b1cd1f04.tar.xz
isso - generate css, html docs; run tests
-rw-r--r--www-apps/isso/isso-9999.ebuild57
1 files changed, 56 insertions, 1 deletions
diff --git a/www-apps/isso/isso-9999.ebuild b/www-apps/isso/isso-9999.ebuild
index 5a1333f..887a95f 100644
--- a/www-apps/isso/isso-9999.ebuild
+++ b/www-apps/isso/isso-9999.ebuild
@@ -31,6 +31,10 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE=""
+if [[ ${PV} == *9999* ]]; then
+ IUSE+=" doc"
+ DOCS=( README.md CHANGES.rst docs/{contribute.rst,faq.rst,isso.example.cfg} )
+fi
LIBDEPEND="dev-python/html5lib[${PYTHON_USEDEP}]
dev-python/itsdangerous[${PYTHON_USEDEP}]
@@ -41,9 +45,60 @@ LIBDEPEND="dev-python/html5lib[${PYTHON_USEDEP}]
>=dev-python/werkzeug-0.8[$(python_gen_usedep 'python2*')]" \
'python2*')
$(python_gen_cond_dep \
- ">=dev-python/werkzeug-0.9[$(python_gen_usedep 'python2*')]" \
+ ">=dev-python/werkzeug-0.9[$(python_gen_usedep 'python3*')]" \
'python3*')"
HDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+if [[ ${PV} == *9999* ]]; then
+ HDEPEND+=" dev-ruby/sass
+ doc? ( dev-python/sphinx )"
+fi
DEPEND="${HDEPEND}\
${LIBDEPEND}"
RDEPEND="${LIBDEPEND}"
+
+python_prepare_all() {
+ if [[ ${PV} == *9999* ]]; then
+ mkdir -p isso/css || die
+ scss isso/css/isso.scss isso/css/isso.css || die
+ fi
+ # TODO: Figure out what to do with js
+}
+
+python_compile_all() {
+ if [[ ${PV} == *9999* ]]; then
+ if use doc; then
+ mkdir -p "${T}"/html || die
+ pushd docs 2>/dev/null || die
+ sphinx-build -E -b dirhtml -a . "${T}"/html || die
+ popd 2>/dev/null || die
+ mkdir -p "${T}"/html/_static/css || die
+ scss docs/_static/css/site.scss "${T}"/html/_static/css/site.css || die
+ fi
+ fi
+}
+
+python_test() {
+ if [[ ${PV} == *9999* ]]; then
+ # doctests fail, require https://github.com/gnublade/doctest-ignore-unicode
+ nosetests --with-coverage \
+ --cover-package=isso --cover-html isso/ specs/ \
+ || die "tests failed"
+ #nosetests --with-doctest --with-doctest-ignore-unicode --with-coverage \
+ # --cover-package=isso --cover-html isso/ specs/ \
+ # || die "tests failed"
+ fi
+}
+
+python_install() {
+ distutils-r1_python_install
+ # build system installs css automatically if present
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if [[ ${PV} == *9999* ]]; then
+ insinto /etc
+ newins docs/isso.example.cfg isso.conf
+ use doc && dodoc -r "${T}"/html
+ fi
+}