description="Parse RSS and Atom feeds in Python
url="https://github.com/kurtmckee/feedparser

packager="tnut <tnut@nutyx.org>"
contributors="Rems,Spiky"

makedepends=(libxml2)

name=python-feedparser
version=6.0.10
release=2

PKGMK_KEEP_SOURCES="no"
source=(base64.patch
        https://github.com/kurtmckee/feedparser/archive/$version.tar.gz)

build() {
  cd feedparser-$version
##  patch -Np1 -i ../base64.patch
  python3 /usr/lib/python3.11/compileall.py feedparser/sgml.py
  python3 setup.py build
  python3 setup.py install --prefix=/usr --root=$PKG

 install -Dm644 feedparser/sgml.py \
 $PKG/usr/lib/python3.11/site-packages/sgml.py

 install -Dm644 feedparser/__pycache__/sgml.cpython-311.pyc \
 $PKG/usr/lib/python3.11/site-packages/__pycache__/sgml.cpython-311.pyc
}
