summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD31
-rw-r--r--fix_aka_class.patch23
4 files changed, 55 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 54068f00ee8b..12f378c207ba 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = python-pytvmaze
pkgdesc = Python interface to the TV Maze API
pkgver = 2.0.8
- pkgrel = 4
+ pkgrel = 5
url = http://pypi.python.org/pypi/pytvmaze
arch = any
license = MIT
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
makedepends = python-setuptools
depends = python
depends = python-requests
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
- md5sums = 562f807f97b1c626d9d9ab090195ba7b
- md5sums = 891925ddba9bbc84784d4174f72d97e2
+ 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
diff --git a/PKGBUILD b/PKGBUILD
index 87c1542c9044..14114d81ebae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,26 +3,33 @@
pkgname=python-pytvmaze
pkgver=2.0.8
-pkgrel=4
-pkgdesc="Python interface to the TV Maze API "
+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=('python-setuptools')
+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")
-md5sums=('562f807f97b1c626d9d9ab090195ba7b'
- '891925ddba9bbc84784d4174f72d97e2')
+ "LICENSE::https://raw.githubusercontent.com/srob650/pytvmaze/master/LICENSE.txt"
+ "fix_aka_class.patch")
+sha512sums=('9d628942255adf9d0183554e02a3d58e0ac392507578f62c7bf534eafc7a75064c20e23db55b697c0d1beedd6f23361e55ba13561dc05e1a6cdc7e4433c80a48'
+ 'e85246930999668fa1d14d290fb9d0eae05a3c702f448983d9d1578b6b6c9c5537d4be004a4db3d5d5d3578858070feaebbc14bedce71caaeb6acd02dac0c42b'
+ 'd46391ad855b934ac5cdfb45a355e9a1fafc69b14fd3b5ba5638428ed6c2fbb6425bb198a7fe0def0fb7c1f92e252c13c7877648e3f797ea17770409d254e93c')
+
+prepare() {
+ cd "pytvmaze-$pkgver"
+ patch -p1 < ../fix_aka_class.patch
+ sed -i 's/description-file/description_file/' setup.cfg
+}
build() {
- cd "$srcdir/pytvmaze-$pkgver"
- python setup.py build
+ cd "pytvmaze-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd "$srcdir/pytvmaze-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
-
- install -Dm644 "$srcdir"/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ 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):