summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 15f0070ead970468a63c9b3df4571080d12bd40d (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
38
39
40
41
42
43
# Maintainer: Kaizhao Zhang <zhangkaizhao@gmail.com>

_srcname=zimports

pkgname=python-zimports
pkgver=0.1.3
pkgrel=2
pkgdesc="yet another import fixing tool"
arch=('any')
url="https://github.com/sqlalchemyorg/zimports"
license=('BSD')
depends=(
  'python-pyflakes'
  'python-flake8-import-order'
)
makedepends=('python' 'python-setuptools')
options=(!emptydirs)
source=(
  "https://files.pythonhosted.org/packages/17/9e/ff7223a7ead8c064435b6200267b1abb5b34c71822ad2ea6d4eaaed8862e/zimports-${pkgver}.tar.gz"
  'without-tests.patch'
)
sha256sums=(
  '1297e0ecfc80dfe746cef3142ae9614eab1bf56ef75176fdea75a0915ab073e7'
  'a174aa9b52935d37febe6f6d6a358cf9773c7adc7aa771cb49dc32bf2a699fd9'
)

prepare() {
  cd "${srcdir}/${_srcname}-${pkgver}"
  patch -p0 -i ../without-tests.patch
}

build() {
  cd "${srcdir}/${_srcname}-${pkgver}"
  python setup.py build
}

package() {
  cd "${srcdir}/${_srcname}-${pkgver}"
  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
  install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
  # LICENSE file is wrong (MIT but not BSD).
  # install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}