summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-31 12:18:15 +0100
committerSam James <sam@gentoo.org>2022-05-31 12:20:06 +0100
commitaf1b429fe4bafcc7377b5bbba414068ef7ba3fb3 (patch)
tree6e640e7037d43e20414b3741f1b0ea052d93dda8
parentdev-python/pytest-httpserver: new package, add 1.0.4 (diff)
downloadgentoo-af1b429f.tar.gz
gentoo-af1b429f.tar.bz2
gentoo-af1b429f.zip
media-sound/gpodder: add Python 3.10, fix tests
Closes: https://bugs.gentoo.org/846065 Closes: https://bugs.gentoo.org/795165 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--media-sound/gpodder/gpodder-3.10.21-r1.ebuild80
1 files changed, 80 insertions, 0 deletions
diff --git a/media-sound/gpodder/gpodder-3.10.21-r1.ebuild b/media-sound/gpodder/gpodder-3.10.21-r1.ebuild
new file mode 100644
index 000000000000..1732c1c4dc72
--- /dev/null
+++ b/media-sound/gpodder/gpodder-3.10.21-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="sqlite"
+DISTUTILS_SINGLE_IMPL=1
+DISTUTILS_USE_SETUPTOOLS=no
+
+inherit distutils-r1 optfeature xdg
+
+DESCRIPTION="A free cross-platform podcast aggregator"
+HOMEPAGE="https://gpodder.github.io/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+dbus bluetooth mtp"
+
+# As in Fedora: re-enable >=dev-python/eyeD3-0.7[${PYTHON_USEDEP}] and
+# ipod? ( media-libs/libgpod[python,${PYTHON_USEDEP}] ) once they
+# support python3
+COMMON_DEPEND="
+ $(python_gen_cond_dep '
+ dev-python/html5lib[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-3.22.0:3[${PYTHON_USEDEP}]
+ >=dev-python/podcastparser-0.6.0[${PYTHON_USEDEP}]
+ >=dev-python/mygpoclient-1.8[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+ ')
+ bluetooth? ( net-wireless/bluez )
+ mtp? ( >=media-libs/libmtp-1.0.0:= )
+"
+RDEPEND="${COMMON_DEPEND}
+ kernel_linux? ( sys-apps/iproute2 )
+"
+DEPEND="${COMMON_DEPEND}
+ dev-util/desktop-file-utils
+ dev-util/intltool
+ sys-apps/help2man
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/minimock[${PYTHON_USEDEP}]
+ dev-python/pytest-httpserver[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ default
+
+ sed -i -e 's:--cov=gpodder::' makefile || die
+}
+
+python_test() {
+ # These are pulled out from the Makefile to give us more control
+ # See bug #795165
+ # Previously, we used 'emake releasetest' in src_test
+ LC_ALL=C epytest --ignore=tests --ignore=src/gpodder/utilwin32ctypes.py --doctest-modules src/gpodder/util.py src/gpodder/jsonconfig.py \
+ -p no:localserver
+ LC_ALL=C epytest tests --ignore=src/gpodder/utilwin32ctypes.py --ignore=src/mygpoclient \
+ -p no:localserver
+}
+
+src_install() {
+ emake PYTHON="${EPYTHON}" DESTDIR="${D}" install
+ distutils-r1_src_install
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "for the youtube-dl extension" net-misc/youtube-dl
+}