archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-diff-match-patch / trunk / PKGBUILD
blobd48c949f966e130ff002cce7612f522e61d0e51d
1 # Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
2 # Contributor: Bruno Pagani <archange@archlinux.org>
4 _pkg=diff-match-patch
5 pkgname=python-${_pkg}
6 pkgver=20200713
7 pkgrel=6
8 pkgdesc="Robust algorithms to perform the operations required for synchronizing plain text"
9 arch=('any')
10 url="https://github.com/diff-match-patch-python/diff-match-patch"
11 license=('Apache')
12 depends=('python')
13 makedepends=('python-setuptools')
14 checkdepends=('python-pytest')
15 source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
16 sha256sums=('da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18')
18 build() {
19   cd ${_pkg}-${pkgver}
20   python setup.py build
23 check() {
24   cd ${_pkg}-${pkgver}
25   pytest
28 package() {
29   cd ${_pkg}-${pkgver}
30   python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
31   find "${pkgdir}" -name *_py2.* -delete
32   rm -r "${pkgdir}"$(python -c "import site; print(site.getsitepackages()[0])")/${_pkg//-/_}/tests