diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | fix_aka_class.patch | 23 |
4 files changed, 62 insertions, 20 deletions
@@ -1,16 +1,21 @@ pkgbase = python-pytvmaze pkgdesc = Python interface to the TV Maze API - pkgver = 0.1 - pkgrel = 1 + pkgver = 2.0.8 + pkgrel = 5 url = http://pypi.python.org/pypi/pytvmaze arch = any license = MIT - makedepends = git + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel makedepends = python-setuptools depends = python depends = python-requests - source = python-pytvmaze::git+https://github.com/srob650/pytvmaze - md5sums = SKIP + source = https://files.pythonhosted.org/packages/source/p/pytvmaze/pytvmaze-2.0.8.tar.gz + source = LICENSE::https://raw.githubusercontent.com/srob650/pytvmaze/master/LICENSE.txt + source = fix_aka_class.patch + sha512sums = 9d628942255adf9d0183554e02a3d58e0ac392507578f62c7bf534eafc7a75064c20e23db55b697c0d1beedd6f23361e55ba13561dc05e1a6cdc7e4433c80a48 + sha512sums = e85246930999668fa1d14d290fb9d0eae05a3c702f448983d9d1578b6b6c9c5537d4be004a4db3d5d5d3578858070feaebbc14bedce71caaeb6acd02dac0c42b + sha512sums = d46391ad855b934ac5cdfb45a355e9a1fafc69b14fd3b5ba5638428ed6c2fbb6425bb198a7fe0def0fb7c1f92e252c13c7877648e3f797ea17770409d254e93c pkgname = python-pytvmaze - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7334925ab911 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD +!*.patch @@ -1,26 +1,35 @@ # Maintainer: LinArcX <Linarcx at gmail . com> +# Maintainer: Nathan Owens <ndowens @ artixlinux.org> pkgname=python-pytvmaze -pkgver=0.1 -pkgrel=1 -pkgdesc="Python interface to the TV Maze API " +pkgver=2.0.8 +pkgrel=5 +pkgdesc="Python interface to the TV Maze API" arch=(any) url="http://pypi.python.org/pypi/pytvmaze" license=(MIT) depends=('python' 'python-requests') -makedepends=('git' 'python-setuptools') -source=("${pkgname}::git+https://github.com/srob650/pytvmaze") -md5sums=('SKIP') +makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools') +source=("https://files.pythonhosted.org/packages/source/p/pytvmaze/pytvmaze-${pkgver}.tar.gz" + "LICENSE::https://raw.githubusercontent.com/srob650/pytvmaze/master/LICENSE.txt" + "fix_aka_class.patch") +sha512sums=('9d628942255adf9d0183554e02a3d58e0ac392507578f62c7bf534eafc7a75064c20e23db55b697c0d1beedd6f23361e55ba13561dc05e1a6cdc7e4433c80a48' + 'e85246930999668fa1d14d290fb9d0eae05a3c702f448983d9d1578b6b6c9c5537d4be004a4db3d5d5d3578858070feaebbc14bedce71caaeb6acd02dac0c42b' + 'd46391ad855b934ac5cdfb45a355e9a1fafc69b14fd3b5ba5638428ed6c2fbb6425bb198a7fe0def0fb7c1f92e252c13c7877648e3f797ea17770409d254e93c') -pkgver() { - cd "$srcdir/${pkgname}" - ( set -o pipefail - git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - ) +prepare() { + cd "pytvmaze-$pkgver" + patch -p1 < ../fix_aka_class.patch + sed -i 's/description-file/description_file/' setup.cfg +} + +build() { + cd "pytvmaze-$pkgver" + python -m build --wheel --no-isolation } package() { - cd "${srcdir}/${pkgname}" - python setup.py install --root="$pkgdir/" --optimize=1 + cd "pytvmaze-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl + install -Dm644 ../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname" } diff --git a/fix_aka_class.patch b/fix_aka_class.patch new file mode 100644 index 000000000000..81549322b2cb --- /dev/null +++ b/fix_aka_class.patch @@ -0,0 +1,23 @@ +From 7aa80ca840ef6b22fb49bf80cc5d3203b8628594 Mon Sep 17 00:00:00 2001 +From: sirmarksalot <56516898+sirmarksalot@users.noreply.github.com> +Date: Sun, 2 Jan 2022 14:17:50 -0600 +Subject: [PATCH] Fix AKA class + +fixed incorrect variables +--- + pytvmaze/tvmaze.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pytvmaze/tvmaze.py b/pytvmaze/tvmaze.py +index 9cdfcb5..afda668 100755 +--- a/pytvmaze/tvmaze.py ++++ b/pytvmaze/tvmaze.py +@@ -380,7 +380,7 @@ def __init__(self, data): + self.country = data.get('country') + + def __repr__(self): +- return '<AKA(name={name},country={country})>'.format(name=name, country=country) ++ return '<AKA(name={name},country={country})>'.format(name=self.name, country=self.country) + + + class Network(object): |