2019-04-17 11:45:35 +00:00

46 lines
1.2 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py-atomicwrites
_pkgname=python-atomicwrites
pkgver=1.1.5
pkgrel=1
pkgdesc="Powerful Python library for atomic file writes"
url="https://github.com/untitaker/python-atomicwrites"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
options="!check" # requires pytest which depends on this aport (cyclic dep)
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://github.com/untitaker/python-atomicwrites/archive/$pkgver/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
_py python2
}
_py3() {
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="8fba7bf6270c2a5d2925c14c4620e3b391fe333617ee3ddee5d3559d39ad9cbdd61fafc715bb9c1802b35079c18ae1a8330c29c24a9c980886b4a73660d3941a python-atomicwrites-1.1.5.tar.gz"