# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Bruno Pagani <archange@archlinux.org>

# Included in Slint by Didier Spaier didieratslintdotfr

_pkg=diff-match-patch
pkgname=python-${_pkg}
pkgver=20200713
pkgrel=2slint
slackdesc="$pkgname (Perform operations to synchronize plain text)"
url="https://github.com/diff-match-patch-python/diff-match-patch"
license=('Apache')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
docs=("LICENSE" "README.md")
options="nosrcpack"
source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
sha256sums=('da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18')

build() {
  cd $SRC/${_pkg}-${pkgver}
  python3 setup.py build
  python3 setup.py install --prefix=/usr --root="$PKG" --skip-build --optimize=1
  find "$PKG" -name *_py2.* -delete
  rm -rf "$PKG"$(python -c "import site; print(site.getsitepackages()[0])")/${_pkg//-/_}/tests
}
