PKGBUILD 1.16 KB
Newer Older
1 2 3
pkgbase=python-ptyprocess
pkgname=('python3-ptyprocess' 'python2-ptyprocess')
_pkgname=ptyprocess
AlmAck's avatar
AlmAck committed
4 5
pkgver=0.5.2
pkgrel=1
6 7 8 9 10 11
pkgdesc="Run a subprocess in a pseudo terminal"
url="https://github.com/pexpect/ptyprocess"
arch=('any')
license=('ISC')
depends=('python3')
makedepends=('python3-setuptools' 'python2-setuptools')
AlmAck's avatar
AlmAck committed
12
source=("https://pypi.io/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
13
       'https://raw.githubusercontent.com/pexpect/ptyprocess/master/LICENSE')
AlmAck's avatar
AlmAck committed
14 15
sha256sums=('e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365'
            'c822d385b1a73329846241799becf18690b5d44764c1bed69300b536a405030a')
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

prepare() {
  cd "$srcdir"
  cp -r $_pkgname-$pkgver ${_pkgname}2-$pkgver
}

package_python3-ptyprocess() {
  cd "$srcdir/$_pkgname-$pkgver"
  python3 setup.py install --root="$pkgdir/" --prefix=/usr --optimize=0
  install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/python-$_pkgname/LICENSE"
}

package_python2-ptyprocess() {
  depends=('python2')
  cd "$srcdir/${_pkgname}2-$pkgver"
  python2 setup.py install --root="$pkgdir/" --prefix=/usr --optimize=0
  install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/python2-$_pkgname/LICENSE"
}