summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4bb9823b854556268b58b84f83cf67ee877e517 (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
# Contributor: Spyros Stathopoulos <foucault.online@gmail.com>
pkgname=python-regex-hg
pkgver=170.72f05ba8c50a
pkgrel=1
pkgdesc="Alternative regular expression module, to replace re."
arch=('i686' 'x86_64')
url="https://bitbucket.org/mrabarnett/mrab-regex"
license=('custom')
depends=('python')
makedepends=('mercurial')
_hgname='mrab-regex'
source=("hg+https://bitbucket.org/mrabarnett/mrab-regex/$_hgname")
md5sums=(SKIP)

_dist=Python3
_regex=regex_3

pkgver() {
  cd ${_hgname}
  echo $(hg identify -n).$(hg identify -i)
}

build() {
  cd "$srcdir/${_hgname}/PyPI"

  if [ ! -d ${_dist} ] ; then
    mkdir ${_dist}
  fi

  if [ ! -d ${_dist}/../docs ] ; then
    mkdir ${_dist}/../docs
  fi

  cp ../docs/Features.rst ${_dist}/../docs
  cp ../${_regex}/regex/* ${_dist}
  cp ../${_regex}/Python/* ${_dist}
  #cp ../${_regex}/UnicodeProperties.txt ${_dist}

  python setup.py build
}

package() {
  cd "$srcdir/${_hgname}/PyPI"
  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
}