public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/you-get/, net-misc/you-get/files/
@ 2024-04-22  0:49 Yixun Lan
  0 siblings, 0 replies; only message in thread
From: Yixun Lan @ 2024-04-22  0:49 UTC (permalink / raw
  To: gentoo-commits

commit:     83c783c59d63bc3ea57064c995b6d352cb691a48
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 22 00:46:07 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Apr 22 00:48:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83c783c5

net-misc/you-get: add python-3.12 support

Closes: https://bugs.gentoo.org/929733
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 net-misc/you-get/files/you-get-python3.12.patch | 39 +++++++++++++++++++++++++
 net-misc/you-get/you-get-0.4.1650-r1.ebuild     | 28 ++++++++++++++++++
 2 files changed, 67 insertions(+)

diff --git a/net-misc/you-get/files/you-get-python3.12.patch b/net-misc/you-get/files/you-get-python3.12.patch
new file mode 100644
index 000000000000..c48b3e7e19d7
--- /dev/null
+++ b/net-misc/you-get/files/you-get-python3.12.patch
@@ -0,0 +1,39 @@
+Subject: [PATCH] Use importlib instead of imp
+
+Fix the deprecated warning.
+Ref: https://stackoverflow.com/a/67692/3342190
+Bug: https://bugs.gentoo.org/929733
+---
+ setup.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 24dc9fb2..78a8e832 100755
+--- a/setup.py
++++ b/setup.py
+@@ -5,7 +5,8 @@ PACKAGE_NAME = 'you_get'
+ 
+ PROJ_METADATA = '%s.json' % PROJ_NAME
+ 
+-import os, json, imp
++import os, json
++import importlib.util
+ here = os.path.abspath(os.path.dirname(__file__))
+ proj_info = json.loads(open(os.path.join(here, PROJ_METADATA), encoding='utf-8').read())
+ try:
+@@ -13,7 +14,11 @@ try:
+ except:
+     README = ""
+ CHANGELOG = open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8').read()
+-VERSION = imp.load_source('version', os.path.join(here, 'src/%s/version.py' % PACKAGE_NAME)).__version__
++version_spec = importlib.util.spec_from_file_location(
++    'version', os.path.join(here, 'src/%s/version.py' % PACKAGE_NAME))
++version = importlib.util.module_from_spec(version_spec)
++version_spec.loader.exec_module(version)
++VERSION = version.__version__
+ 
+ from setuptools import setup, find_packages
+ setup(
+-- 
+2.44.0
+

diff --git a/net-misc/you-get/you-get-0.4.1650-r1.ebuild b/net-misc/you-get/you-get-0.4.1650-r1.ebuild
new file mode 100644
index 000000000000..3d5b58a7cb5c
--- /dev/null
+++ b/net-misc/you-get/you-get-0.4.1650-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="Utility to download media contents from the web"
+HOMEPAGE="https://you-get.org"
+SRC_URI="https://github.com/soimort/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RESTRICT="test"
+PROPERTIES="test_network"
+
+RDEPEND="
+	media-video/ffmpeg
+"
+
+PATCHES=( "${FILESDIR}/${PN}-python3.12.patch" )
+
+distutils_enable_tests unittest


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-22  0:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-22  0:49 [gentoo-commits] repo/gentoo:master commit in: net-misc/you-get/, net-misc/you-get/files/ Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox