git » python-beautifulsoup4.git » main » tree

[main] / PKGBUILD

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=python-beautifulsoup4
_pkgname="${pkgname#python-}"
pkgver=4.12.3
pkgrel=2
pkgdesc='A Python HTML/XML parser designed for quick turnaround projects like screen-scraping'
arch=('any')
url='https://www.crummy.com/software/BeautifulSoup/'
license=('MIT')
depends=(
  'python'
  'python-soupsieve'
)
optdepends=(
  'python-cchardet: alternative to autodetect character encodings'
  'python-chardet: to autodetect character encodings'
  'python-lxml: alternative HTML parser'
  'python-html5lib: alternative HTML parser'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-hatchling'
)
#checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://www.crummy.com/software/BeautifulSoup/bs4/download/${pkgver%.*}/$_pkgname-$pkgver.tar.gz")
sha512sums=('b5b6cc9f64a97fa52b9a2ee1265aa215db476e705d3d79e49301de7e8d36c56c96924cb440eec0715f7ec75c5ddf4c1ade9d6cef7cdc9bf9e37125ac6eb50837')
b2sums=('dac85b2d56ad1d2faf040def2141cb7a7ca68def7fc48fab18e11c23878795fcecfdd43058e70229e014e23e67f56a55160aa4ba08bab4b3d955bd10a07c8168')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --no-isolation
}

#check() {
#  cd "$_pkgname-$pkgver"

##  pytest -v
#}

package() {
  cd "$_pkgname-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  # license
  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}