summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-packaging/PKGBUILD
blob: 34a48bcdbd21b5ddeb76171031da7a1c1f0a8524 (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
44
45
46
47
48
49
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgbase=python-packaging
pkgname=(python-packaging python2-packaging)
pkgver=16.8
pkgrel=3
pkgdesc="Core utilities for Python packages"
arch=('any')
url="https://github.com/pypa/packaging"
license=('Apache')
makedepends=('python-setuptools' 'python2-setuptools' 'python-pyparsing' 'python2-pyparsing' 'git')
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pretend' 'python2-pretend' 'python-coverage' 'python2-coverage')
source=("git+https://github.com/pypa/packaging.git#tag=$pkgver")
md5sums=('SKIP')

prepare() {
  cp -a packaging{,-py2}
}

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

  cd "$srcdir"/packaging-py2
  python2 setup.py build
}

check() {
  cd "$srcdir"/packaging
  python setup.py ptr

  cd "$srcdir"/packaging-py2
  python2 setup.py ptr
}

package_python-packaging() {
  depends=('python-pyparsing' 'python-six')

  cd "$srcdir"/packaging
  python setup.py install --root "$pkgdir"
}

package_python2-packaging() {
  depends=('python2-pyparsing' 'python2-six')

  cd "$srcdir"/packaging-py2
  python2 setup.py install --root "$pkgdir"
}