git » python-feedparser.git » commit 71e81c1

upgpkg: 6.0.11-1

author Daniel M. Capella
2023-12-10 22:11:09 UTC
committer Daniel M. Capella
2023-12-10 22:11:09 UTC
parent 8698522e1115f9c554de07978481c59057f9787f

upgpkg: 6.0.11-1

.SRCINFO +23 -0
PKGBUILD +25 -20

diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..604bfa9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = python-feedparser
+	pkgdesc = Parse RSS and Atom feeds in Python
+	pkgver = 6.0.11
+	pkgrel = 1
+	url = https://github.com/kurtmckee/feedparser
+	arch = any
+	license = custom
+	checkdepends = python-chardet
+	makedepends = git
+	makedepends = python-build
+	makedepends = python-installer
+	makedepends = python-setuptools
+	makedepends = python-wheel
+	depends = libxml2
+	depends = python-sgmllib3k
+	optdepends = python-chardet: for character encoding auto-detection
+	optdepends = python-cchardet: for faster character encoding auto-detection
+	source = git+https://github.com/kurtmckee/feedparser.git#tag=6.0.11
+	source = feedparser-fix-tests-on-py310.patch::https://github.com/kurtmckee/feedparser/commit/c55bd8ad37db89bd219783bc514d600c9523ed38.patch
+	b2sums = SKIP
+	b2sums = b803c355e8ed8ee941e4478d3e05271eaf49686a45d32d1d62217811ea64e6315ff9d8e83456267e67ceb5f84c6a3000b61f5a7eccd3ead6fb8e2286864e651e
+
+pkgname = python-feedparser
diff --git a/PKGBUILD b/PKGBUILD
index 4aecc9e..6c9e7b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,54 +1,59 @@
 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
 # Contributor: Eric Bélanger <eric@archlinux.org>
 
-_name=feedparser
 pkgname=python-feedparser
-pkgver=6.0.10
-pkgrel=3
+_name=${pkgname#python-}
+pkgver=6.0.11
+pkgrel=1
 pkgdesc='Parse RSS and Atom feeds in Python'
 arch=('any')
 url=https://github.com/kurtmckee/feedparser
 license=('custom')
 depends=('libxml2' 'python-sgmllib3k')
-makedepends=('python-build' 'python-installer' 'python-setuptools'
-             'python-wheel')
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-setuptools'
+  'python-wheel'
+)
 checkdepends=('python-chardet')
-optdepends=('python-chardet: for character encoding auto-detection'
-            'python-cchardet: for faster character encoding auto-detection')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
-        'feedparser-fix-tests-on-py310.patch::https://github.com/kurtmckee/feedparser/commit/c55bd8ad37db89bd219783bc514d600c9523ed38.patch')
-sha256sums=('27da485f4637ce7163cdeab13a80312b93b7d0c1b775bef4a47629a3110bca51'
-            'df3ff5c144a9edabaee77fcf7aa465cc2a1a3ba85316830b7346f884367d155f')
-b2sums=('044070eff7b3ef9422b1d4fb5a30e473feba55431d9fd2619573ac2f0f8c9e9e90e81f54797cbdaf965ca67b3f0cf169f478b7f08a933457df05e266238e6462'
+optdepends=(
+  'python-chardet: for character encoding auto-detection'
+  'python-cchardet: for faster character encoding auto-detection'
+)
+source=(
+  "git+$url.git#tag=$pkgver"
+  'feedparser-fix-tests-on-py310.patch::https://github.com/kurtmckee/feedparser/commit/c55bd8ad37db89bd219783bc514d600c9523ed38.patch'
+)
+b2sums=('SKIP'
         'b803c355e8ed8ee941e4478d3e05271eaf49686a45d32d1d62217811ea64e6315ff9d8e83456267e67ceb5f84c6a3000b61f5a7eccd3ead6fb8e2286864e651e')
 
 prepare() {
-  cd $_name-$pkgver
+  cd "$_name"
   patch --forward --strip=1 --input=../feedparser-fix-tests-on-py310.patch
 }
 
 build() {
-  cd $_name-$pkgver
+  cd "$_name"
   python -m build --wheel --skip-dependency-check --no-isolation
 }
 
 check() {
-  cd $_name-$pkgver
+  cd "$_name"
   # https://github.com/kurtmckee/feedparser/issues/236
   mv tests/illformed/undeclared_namespace.xml{,.bak}
-  python -m venv --system-site-packages test-env
-  test-env/bin/python -m installer dist/*.whl
-  test-env/bin/python tests/runtests.py
+  PYTHONPATH="$PWD/build/lib" python tests/runtests.py
   mv tests/illformed/undeclared_namespace.xml{.bak,}
 }
 
 package() {
-  cd $_name-$pkgver
+  cd "$_name"
   python -m installer --destdir="$pkgdir" dist/*.whl
 
   # Symlink license file
   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
   install -d "$pkgdir"/usr/share/licenses/$pkgname
-  ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
+  ln -s "$site_packages"/"$_name"-$pkgver.dist-info/LICENSE \
     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }