you-get: rebuild for Python 3.12

This commit is contained in:
Andrew J. Hesford 2023-09-23 21:02:41 -04:00
parent 423c61f4bb
commit e821dcb4d9
2 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,23 @@
Python 3.12 does not provide the imp module, so just add a version placeholder
that can be substituted in the template.
--- ./setup.py.orig 2023-09-29 10:39:49.179745785 -0400
+++ ./setup.py 2023-09-29 10:40:17.005916409 -0400
@@ -5,7 +5,7 @@
PROJ_METADATA = '%s.json' % PROJ_NAME
-import os, json, imp
+import os, json
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 +13,7 @@
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 = '@@VERSION@@'
from setuptools import setup, find_packages
setup(

View file

@ -1,7 +1,7 @@
# Template file for 'you-get'
pkgname=you-get
version=0.4.1650
revision=1
revision=2
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-pysocks python3-setuptools"
@ -13,6 +13,10 @@ changelog="https://raw.githubusercontent.com/soimort/you-get/develop/CHANGELOG.r
distfiles="${PYPI_SITE}/y/you-get/you-get-${version}.tar.gz"
checksum=b3c944cf7a63cc468cccc8816dce7fc008c2e6b5ba52aefe5ce2081818a3ad47
post_patch() {
vsed -i -e "s/@@VERSION@@/${version}/" setup.py
}
post_install() {
vlicense LICENSE.txt
}