summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a2d00651a1267a87f3a8a3f95d7b77bd8efcd4d8 (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
# Maintainer: William Turner <willtur.will@gmail.com>
pkgbase=python-booleanoperations
pkgname=(python-booleanoperations python2-booleanoperations)
_pkgname=booleanOperations
pkgver=0.8.0
pkgrel=1
pkgdesc='Boolean operations on paths based on a super fast polygon clipper library by Angus Johnson.'
arch=('any')
url='https://github.com/typemytype/booleanOperations'
license=('MIT')
depends=('python' 'python-pyclipper' 'python-fonttools' 'python-ufolib'
         'python2' 'python2-pyclipper' 'python2-fonttools' 'python2-ufolib')
makedepends=('python-pip' 'python2-pip')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/py2.py3/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}-py2.py3-none-any.whl")
sha256sums=('e405de0126aaf0f6e4f3dcebd18079db601e825e123cb095366b2a50e9abbc8c')

package_python-booleanoperations() {
  depends=('python' 'python-pyclipper' 'python-fonttools' 'python-ufolib')
  provides=('python-booleanoperations')

  cd "${srcdir}"

  # install the wheel
  PIP_CONFIG_FILE=/dev/null pip install \
    --isolated \
    --root="${pkgdir}" \
    --ignore-installed \
    --no-deps \
    ${_pkgname}-${pkgver}-py2.py3-none-any.whl

  # compile to pyo
  python -O -m compileall "${pkgdir}"
}

package_python2-booleanoperations() {
  depends=('python2' 'python2-pyclipper' 'python2-fonttools' 'python2-ufolib')
  provides=('python2-booleanoperations')

  cd "${srcdir}"

  # install the wheel
  PIP_CONFIG_FILE=/dev/null pip2 install \
    --isolated \
    --root="${pkgdir}" \
    --ignore-installed \
    --no-deps \
    ${_pkgname}-${pkgver}-py2.py3-none-any.whl

  # compile to pyo
  python2 -O -m compileall "${pkgdir}"
}