summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-21 13:37:56 +0100
committerMichał Górny <mgorny@gentoo.org>2018-03-21 15:31:59 +0100
commitced2d722638d6297fbae1058b5ec9f7aedd91071 (patch)
treeb4aa7cbea2493010f8f7dcacc8d75ef89fbc48d7 /dev-python/cssselect
parentprofile: package.use.stable.mask - ~app-backup/bacula-9.0.6[libressl] (diff)
downloadgentoo-ced2d722638d6297fbae1058b5ec9f7aedd91071.tar.gz
gentoo-ced2d722638d6297fbae1058b5ec9f7aedd91071.tar.bz2
gentoo-ced2d722638d6297fbae1058b5ec9f7aedd91071.zip
dev-python/cssselect: Bump to 1.0.3, enable tests
Diffstat (limited to 'dev-python/cssselect')
-rw-r--r--dev-python/cssselect/Manifest1
-rw-r--r--dev-python/cssselect/cssselect-1.0.3.ebuild47
2 files changed, 48 insertions, 0 deletions
diff --git a/dev-python/cssselect/Manifest b/dev-python/cssselect/Manifest
index be84cd6dd782..1081cf50aa40 100644
--- a/dev-python/cssselect/Manifest
+++ b/dev-python/cssselect/Manifest
@@ -1,2 +1,3 @@
DIST cssselect-0.9.1.tar.gz 32952 BLAKE2B 7f7a78e8085036bed72c2a1a0e4a97cd1988e8d6981ae830f15d5fc03f5fdd43f0caa7b94d2923181f9dc926a6a11e970b3f091178640124286aa680fa023aaf SHA512 c4cd2c8d6fbfa99b836554685dd59e1e794e1fab06fcf4419a226b0608a05d58be5af54e507003f2a233a22f03d59d3d63c0bf19b3314f15c95ab3ce5f4db6cc
DIST cssselect-1.0.1.tar.gz 21849 BLAKE2B cfe3637746329db224a44b680cda044238fa831ed0d05cf3484be6181de13bf8660330362626ddc03c7284a80e7c4a814bba293dfdca07a529d9c0c7163c95d2 SHA512 060c4b8d427a935b851b4b20d10ef89b9d6f685692b7144afc8f848e318abaa182ed60538355ea3f25050e358f24904fa0d9c01fe77e3d2428e2ef2a825e2928
+DIST cssselect-1.0.3.tar.gz 34027 BLAKE2B fff15a50d26ce83a0480020e54d00a027a7f21ca2c4c45d5552c6b4c19f7be21c390650c4befa61b7ae2b63946de88945deb488ebd6c7f7fc470950dab233671 SHA512 08feb3a515cc75089657a508cd1a80c6aaa97d710f27e99f9e749a1519adc13c5540134c6a4e0d7f548b022b8bd23dcbe360530d2329c5da36e43aca1f9627d1
diff --git a/dev-python/cssselect/cssselect-1.0.3.ebuild b/dev-python/cssselect/cssselect-1.0.3.ebuild
new file mode 100644
index 000000000000..1b3b4958a844
--- /dev/null
+++ b/dev-python/cssselect/cssselect-1.0.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="parses CSS3 Selectors and translates them to XPath 1.0"
+HOMEPAGE="https://cssselect.readthedocs.io/en/latest/
+ https://pypi.python.org/pypi/cssselect
+ https://github.com/scrapy/cssselect"
+SRC_URI="https://github.com/scrapy/cssselect/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-fbsd"
+IUSE="doc test"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/lxml[${PYTHON_USEDEP}] )"
+
+RDEPEND=""
+
+python_prepare_all() {
+ # prevent non essential d'load of files in doc build
+ sed -e 's:intersphinx_:#&:' -i docs/conf.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc ; then
+ esetup.py build_sphinx
+ fi
+}
+
+python_test() {
+ "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ distutils-r1_python_install_all
+}