summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38dc0d77eb95cc68159f1cd9a54473239164d664 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: BrainDamage

pkgname=python-untangle
pkgver=1.2.1
pkgrel=2
pkgdesc="Converts XML to a Python object"
arch=('any')
url="https://github.com/stchris/untangle"
license=('MIT')
depends=('python-defusedxml')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('696643dd2879c1af55c592e07bf0de48d330157d2def66993abaa0169661dadc')


# template start; name=tarball; version=1;
_dirname="${pkgname}-${pkgver}"
_basename="${pkgname}"
# template end;
# template start; name=python; version=1;
depends+=('python')
makedepends+=('python-setuptools')
# strip the python- prefix from names if present
_dirname="${_dirname#python-}"
_basename="${_basename#python-}"

build() {
  cd "${srcdir}/${_dirname}"
  python setup.py build
}

package() {
  cd "${srcdir}/${_dirname}"
  python setup.py install --optimize=1 --skip-build --root="${pkgdir}/" --prefix="/usr"
	# not necessary for every package, but for those who it is, it'd generate conflict with others otherwise
  rm -rf "${pkgdir}/$(python -c 'import site; print(site.getsitepackages()[0])')/tests/"
}
# template end;