summaryrefslogtreecommitdiff
path: root/python-wxutils/PKGBUILD
blob: 805e60ffbb3bddc0d27bac160067e9a13c879b84 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgbase=python-wxutils
pkgname=(python2-wxutils python-wxutils)
_pkgname="${pkgbase#*-}"
pkgver=0.2.3
pkgrel=2
pkgdesc='A library of convenience functions for wxPython'
arch=('any')
url='https://pypi.python.org/pypi/wxutils/0.1.2'
license=('BSD')
groups=()
_deppy2=(
  'python2>=2.7'
  'python2<2.8'
  'wxpython'
)
_deppy=(
  'python>=3.8'
  'python<3.9'
  'python-wxpython'
)
_makedepends=(
  'python-setuptools'
)
makedepends=(
  "${_deppy[@]}"
  "${_deppy2[@]}"
  "${_makedepends[@]}"
  "${_makedepends[@]/ython/ython2}"
)
source=(
    "https://pypi.python.org/packages/55/e9/dbec604ebb961cca28c6e835d050326d87f592d4bdc8171097230ea5b407/${_pkgname}-${pkgver}.tar.gz"
)
sha512sums=('098d9b1030f16478db37960fcb9fc414222c8e3623bb6910b5281b986a43b4a6c879b1af09a836bd659b220aeb5e2d3f31d4d6474e241fe03c4893a3dea85218')

prepare() {
    cp -a ${pkgbase#*-}-${pkgver}{,-py2}
}

build() {

    echo "Building python2..."
    cd "${srcdir}/${_pkgname}-${pkgver}-py2"
    python2 setup.py build

    echo "Building python..."
    cd "${srcdir}/${_pkgname}-${pkgver}"
    python setup.py build

}

package_python2-wxutils() {

    depends=(
      "${_deppy2[@]}"
    )
    cd ${_pkgname}-${pkgver}-py2
    python2 setup.py install --skip-build --root="${pkgdir}" --prefix=/usr
    find "${pkgdir}" -type f -exec sed -i '1 s@^\(#!/usr/bin\(/env\s\+\)\?python\)\s*$@\12@' {} \;

}

package_python-wxutils() {

    depends=(
      "${_deppy[@]}"
    )
    cd ${_pkgname}-${pkgver}
    python setup.py install --skip-build --root="${pkgdir}" --prefix=/usr

}