summaryrefslogtreecommitdiff
path: root/dev-python/cssutils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/cssutils
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/cssutils')
-rw-r--r--dev-python/cssutils/Manifest6
-rw-r--r--dev-python/cssutils/cssutils-1.0.1.ebuild53
-rw-r--r--dev-python/cssutils/cssutils-1.0.2.ebuild49
-rw-r--r--dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch32
-rw-r--r--dev-python/cssutils/metadata.xml20
5 files changed, 160 insertions, 0 deletions
diff --git a/dev-python/cssutils/Manifest b/dev-python/cssutils/Manifest
new file mode 100644
index 000000000000..a49c49959669
--- /dev/null
+++ b/dev-python/cssutils/Manifest
@@ -0,0 +1,6 @@
+AUX cssutils-1.0.1-pypy-test-backport.patch 1215 BLAKE2B 8a6859fb3721a1c36541c816d10da5109a525bb8f92e07df79c0bf0d002240f838a7b58b67779acf7c41f331b218fa3342385ed3ecb2d15e624f14cec1336536 SHA512 a0072d67f034b066a30ec9cd35b5f618ce8e0beea2b1236b6900d7e028b1ed7d6095ca0beaf0eacb3f7e8a4649e22b98951df9a303d4761f15d7472e2e57b41e
+DIST cssutils-1.0.1.tar.gz 353621 BLAKE2B 142320e2358acb1b5b95400f42fb5eb40840602bd204f68a1896ea92b35dfe2ce6f316d84cf5d21a2ef8047f4748294b908057fa12cab352b42d7ab2ffcfaa6f SHA512 932a128443cc31f689d91c7c75a04ddc79824b4e5c0779e48d30fa0a3a760cad82d8208264ec95a3b120c38962f2eabf6b3456aa8f81d24e9c9718e95fd6bf83
+DIST cssutils-1.0.2.tar.gz 367038 BLAKE2B e19edce100dbc05d6e469eb6b0ad234d7d4c9458aca1b2a3e72bdeff1a35dec64427353936a339e2071d8ba2e8804c5754f55a391955a61ef61ae56381269125 SHA512 4988893875a03923d3127e334654799e5c2ebcdc0a7f5b3fb5c9ab27d1b331caa5bf197161312a298531e0757843aa3259ceba5fa19947353eea24a5da53ceda
+EBUILD cssutils-1.0.1.ebuild 1303 BLAKE2B 0fd67a170ef9be0cb5bc2142cf9e4a72c01b6c9d692524f25a4c40bd23028c38b67cca1aca670edf957240b8fbbd8ab9cdea4f03f78460eed33307e0237758e0 SHA512 4c7ad7e7330b3f4423d9900c7fa0aa144eec3d3478f3562bff1969073882955df1954681c4f649c272239ddd33d1ffc671127ac281fddfb2234b9e4d27ee597d
+EBUILD cssutils-1.0.2.ebuild 1250 BLAKE2B 780ae60403e6bfe7031d4edb993805d6493dabc21cff135d9132088d2cff69836100ca0a08de4157834c6034e97509f1fd5b6508679728a71851f5a377aec5ab SHA512 3d81ae75d85e948e4f00a4317c75db64e6dc8484bc352443243843a4e185ef5098465942c5ee22ef4e056187f70508046f2a0ec760e8f07cd99033959dbdcf92
+MISC metadata.xml 669 BLAKE2B 1d3cf25cab5d7a828451da5ec24ccae08e31141e6ec2ffe3efaead8284a4a7763a1c5d053138bbbc2f3846a45dcb6bb353efaffdf0a83fc110f13a6af13ed1ac SHA512 3fe0661179833d29c8a5e5ae2b7d872ad860354c58bff8e18935f5876fd95cf8fdfbb4ebda9719198dfce891647d04f263d213b74eca635005098a89a0402294
diff --git a/dev-python/cssutils/cssutils-1.0.1.ebuild b/dev-python/cssutils/cssutils-1.0.1.ebuild
new file mode 100644
index 000000000000..df05bd96b105
--- /dev/null
+++ b/dev-python/cssutils/cssutils-1.0.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="A CSS Cascading Style Sheets library"
+HOMEPAGE="https://pypi.org/project/cssutils/ https://bitbucket.org/cthedot/cssutils http://cthedot.de/cssutils/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 arm ppc x86"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-pypy-test-backport.patch
+)
+
+python_prepare_all() {
+ # Disable test failing with dev-python/pyxml installed.
+ if has_version dev-python/pyxml; then
+ sed -e "s/test_linecol/_&/" -i src/tests/test_errorhandler.py
+ fi
+
+ # requires old pbr, does it really?
+ sed \
+ -e '/tests_require/d' \
+ -i setup.py || die
+
+ EPATCH_OPTS="--binary"
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ ln -s "${S}/sheets" "${BUILD_DIR}/sheets" || die
+ # esetup.py test
+ # exclude tests that connect to the network
+ set -- nosetests \
+ -e test_parseUrl -e test_handlers -P "${BUILD_DIR}/lib/cssutils/tests"
+ echo "$@"
+ "$@" || die "Testing failed with ${EPYTHON}"
+}
diff --git a/dev-python/cssutils/cssutils-1.0.2.ebuild b/dev-python/cssutils/cssutils-1.0.2.ebuild
new file mode 100644
index 000000000000..bcb2600b3e7f
--- /dev/null
+++ b/dev-python/cssutils/cssutils-1.0.2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="A CSS Cascading Style Sheets library"
+HOMEPAGE="https://pypi.org/project/cssutils/ https://bitbucket.org/cthedot/cssutils http://cthedot.de/cssutils/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+
+python_prepare_all() {
+ # Disable test failing with dev-python/pyxml installed.
+ if has_version dev-python/pyxml; then
+ sed -e "s/test_linecol/_&/" \
+ -i src/cssutils/tests/test_errorhandler.py \
+ || die
+ fi
+
+ # requires old pbr, does it really?
+ sed \
+ -e '/tests_require/d' \
+ -i setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ ln -s "${S}/sheets" "${BUILD_DIR}/sheets" || die
+ # esetup.py test
+ # exclude tests that connect to the network
+ set -- nosetests \
+ -e test_parseUrl -e test_handlers -P "${BUILD_DIR}/lib/cssutils/tests"
+ echo "$@"
+ "$@" || die "Testing failed with ${EPYTHON}"
+}
diff --git a/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch b/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch
new file mode 100644
index 000000000000..f5f1bda3516d
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User Daniel <kingdread@gmx.de>
+# Date 1448482419 -3600
+# Node ID 01a19d494b6f31e91c54ae39c5a6f43f6292a85d
+# Parent 3a01bd18118a6466ad93aa23caaa4164528b59ac
+Fix tests on PyPy 2
+
+Tests fail because of the extra "u" prefix in the error message
+
+diff --git a/src/cssutils/tests/test_profiles.py b/src/cssutils/tests/test_profiles.py
+--- a/src/cssutils/tests/test_profiles.py
++++ b/src/cssutils/tests/test_profiles.py
+@@ -2,6 +2,7 @@
+ __version__ = '$Id: test_cssvalue.py 1443 2008-08-31 13:54:39Z cthedot $'
+
+ import sys
++import platform
+ import basetest
+ import cssutils
+
+@@ -124,6 +125,11 @@
+ expmsg = u"invalid literal for int(): x"
+ elif sys.platform.startswith('java'):
+ expmsg = u"invalid literal for int() with base 10: x"
++ # PyPy adds the u prefix, but only in versions lower than Python 3
++ elif (platform.python_implementation() == "PyPy" and
++ sys.version_info < (3, 0)):
++ expmsg = u"invalid literal for int() with base 10: u'x'"
++
+
+ self.assertRaisesMsg(Exception, expmsg,
+ cssutils.profile.validate, u'-test-funcval', u'x')
diff --git a/dev-python/cssutils/metadata.xml b/dev-python/cssutils/metadata.xml
new file mode 100644
index 000000000000..fbd9010455e4
--- /dev/null
+++ b/dev-python/cssutils/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lordvan@gentoo.org</email>
+ <name>Thomas Raschbacher</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+A Python package to parse and build CSS Cascading Style Sheets.
+</longdescription>
+ <upstream>
+ <remote-id type="google-code">cssutils</remote-id>
+ <remote-id type="pypi">cssutils</remote-id>
+ <remote-id type="bitbucket">cthedot/cssutils</remote-id>
+ </upstream>
+</pkgmetadata>