summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Muskee <wimmuskee@gmail.com>2020-11-01 07:57:33 +0100
committerSam James <sam@gentoo.org>2021-03-09 09:44:24 +0000
commit52d13f1e62303a560cc39ebc934eaa0286196dde (patch)
tree7f0ca43e9951e9803d228635d7c076be426d70ae /dev-python/urlgrabber
parentdev-python/python-markdown-math: mark ALLARCHES (diff)
downloadgentoo-52d13f1e62303a560cc39ebc934eaa0286196dde.tar.gz
gentoo-52d13f1e62303a560cc39ebc934eaa0286196dde.tar.bz2
gentoo-52d13f1e62303a560cc39ebc934eaa0286196dde.zip
dev-python/urlgrabber: version bump to 4.1.0
- add gh upstream id to metadata - add github project url to HOMEPAGE - add explicit DISTUTILS_USE_SETUPTOOLS - add six as RDEPEND - add restricted test phase (internet only) - and patches to let unittests run without failure Closes: https://github.com/gentoo/gentoo/pull/18102 Signed-off-by: Wim Muskee <wimmuskee@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/urlgrabber')
-rw-r--r--dev-python/urlgrabber/Manifest1
-rw-r--r--dev-python/urlgrabber/files/urlgrabber-4.1.0-skip-test_range.patch11
-rw-r--r--dev-python/urlgrabber/files/urlgrabber-4.1.0-test-mirror-set-thread-daemon.patch10
-rw-r--r--dev-python/urlgrabber/metadata.xml1
-rw-r--r--dev-python/urlgrabber/urlgrabber-4.1.0.ebuild36
5 files changed, 59 insertions, 0 deletions
diff --git a/dev-python/urlgrabber/Manifest b/dev-python/urlgrabber/Manifest
index fc93e0b25fb6..cd42b95c38a2 100644
--- a/dev-python/urlgrabber/Manifest
+++ b/dev-python/urlgrabber/Manifest
@@ -1 +1,2 @@
DIST urlgrabber-4.0.0.tar.gz 86308 BLAKE2B 15195336d8e19331134b3bc1de29a669b80ab62c14e613fbcbbc1b8be8cb4ee1da3df317591989c6a3e3a403f8ad9071ca866006f23fbadc6283e88d5f050290 SHA512 01579281b1548c71737166daa6dfb7eaafceaf4afd9703f8e5e3193c33613750cb4291e3c7939065e995a173925965a16e656c43324f3b599f9c83d9e479e8c1
+DIST urlgrabber-4.1.0.tar.gz 277537 BLAKE2B 3697cb1d08fe0fa8bc83118e1466d76d1b8aa0375fd895d12f5135850bb5100d1d52b1691b2135a80a4937158c5d362e88777ae9ba58790ad88355f13e679b34 SHA512 43e54656d0ca92f616d49cd90dd6282408d64909848e4bf1c74b3b1eede55ba0c9526d6ea5fa9ae18545b806ef9965130ecf1cb1f5f05d4611db974d3f2aa200
diff --git a/dev-python/urlgrabber/files/urlgrabber-4.1.0-skip-test_range.patch b/dev-python/urlgrabber/files/urlgrabber-4.1.0-skip-test_range.patch
new file mode 100644
index 000000000000..548242fc1894
--- /dev/null
+++ b/dev-python/urlgrabber/files/urlgrabber-4.1.0-skip-test_range.patch
@@ -0,0 +1,11 @@
+--- urlgrabber-urlgrabber-4-1-0/test/test_mirror.py.orig 2020-11-16 06:23:15.874354961 +0100
++++ urlgrabber-urlgrabber-4-1-0/test/test_mirror.py 2020-11-16 06:23:59.674354944 +0100
+@@ -329,6 +329,8 @@
+ self.assertEqual(self.code, 503); del self.code
+
+ def test_range(self):
++ # skip failing test
++ self.skip()
+ 'test client-side processing of HTTP ranges'
+ # server does not process ranges
+ self.reply = 200, b'OK'
diff --git a/dev-python/urlgrabber/files/urlgrabber-4.1.0-test-mirror-set-thread-daemon.patch b/dev-python/urlgrabber/files/urlgrabber-4.1.0-test-mirror-set-thread-daemon.patch
new file mode 100644
index 000000000000..6d6e8afa6462
--- /dev/null
+++ b/dev-python/urlgrabber/files/urlgrabber-4.1.0-test-mirror-set-thread-daemon.patch
@@ -0,0 +1,10 @@
+--- urlgrabber-urlgrabber-4-1-0/test/test_mirror.py.orig 2020-11-16 18:47:43.724337579 +0100
++++ urlgrabber-urlgrabber-4-1-0/test/test_mirror.py 2020-11-16 18:47:57.724337574 +0100
+@@ -290,6 +290,7 @@
+ self.exit = False
+
+ self.thread = threading.Thread(target=server)
++ self.thread.daemon = True
+ self.thread.start()
+
+ # create grabber and mirror group objects
diff --git a/dev-python/urlgrabber/metadata.xml b/dev-python/urlgrabber/metadata.xml
index 96c924d2a326..4713699df8c6 100644
--- a/dev-python/urlgrabber/metadata.xml
+++ b/dev-python/urlgrabber/metadata.xml
@@ -36,5 +36,6 @@
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">urlgrabber</remote-id>
+ <remote-id type="github">rpm-software-management/urlgrabber</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-python/urlgrabber/urlgrabber-4.1.0.ebuild b/dev-python/urlgrabber/urlgrabber-4.1.0.ebuild
new file mode 100644
index 000000000000..263b608bd500
--- /dev/null
+++ b/dev-python/urlgrabber/urlgrabber-4.1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Python module for downloading files"
+HOMEPAGE="http://urlgrabber.baseurl.org https://github.com/rpm-software-management/urlgrabber"
+SRC_URI="https://github.com/rpm-software-management/${PN}/archive/${PN}-${PV//./-}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86"
+RESTRICT="test"
+
+RDEPEND="
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/urllib3[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-skip-test_range.patch"
+ "${FILESDIR}/${P}-test-mirror-set-thread-daemon.patch"
+)
+S="${WORKDIR}/${PN}-${PN}-${PV//./-}"
+
+python_test() {
+ # Entire testsuite relies on connecting to the i'net, added for reference
+ URLGRABBER_EXT_DOWN="${S}/scripts/urlgrabber-ext-down" \
+ PYTHON_PATH="${S}" \
+ "${PYTHON}" test/runtests.py -v 2 || die "tests failed under ${EPYTHON}"
+}