summaryrefslogtreecommitdiff
path: root/www-apps/isso/isso-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/isso/isso-9999.ebuild')
-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 5a1333f1..887a95fd 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
+}