Skip to content
Snippets Groups Projects
PKGBUILD 1.47 KiB
Newer Older
# Maintainer: Andrew Crerar <crerar@archlinux.org>
Morten Linderud's avatar
Morten Linderud committed
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
Felix Yan's avatar
Felix Yan committed
# Contributor: Hideaki Takahashi <mymelo+aur@gmail.com>
# Contributor: Vincent Demeester <vincent@sbr.io>
# Contributor: Josh VanderLinden <arch@cloudlery.com>

Andrew Crerar's avatar
Andrew Crerar committed
pkgver=5.0.2
Morten Linderud's avatar
Morten Linderud committed
pkgrel=1
Felix Yan's avatar
Felix Yan committed
pkgdesc="A Python library for the Docker Engine API"
arch=('any')
url="https://github.com/docker/docker-py"
license=("Apache")
depends=('python-requests' 'python-six' 'python-websocket-client' 'python-docker-pycreds' 'python-paramiko')
makedepends=('python-pip' 'python-requests' 'python-six' 'python-websocket-client'
             'python-docker-pycreds')
checkdepends=('python-pytest' 'python-pytest-cov' 'python-pytest-timeout'
              'python-mock' 'python-coverage' 'flake8')
provides=('python-docker-py')
conflicts=('python-docker-py')
replaces=('python-docker-py')
source=("$pkgname-$pkgver.tar.gz::https://github.com/docker/docker-py/archive/$pkgver.tar.gz")
Andrew Crerar's avatar
Andrew Crerar committed
sha512sums=('f0e4aacc819fd01932586b288b859553758b84deb7387dc770c079369a9e2b89a5f34d29a310a28c9ae64bc3663b53c55b06dab65e8ef7e2281eb14ebc4f9ffb')
Felix Yan's avatar
Felix Yan committed

prepare() {
  sed -i 's/==.*$//' docker-py-"$pkgver"/{,test-}requirements.txt
Felix Yan's avatar
Felix Yan committed
}

build() {
  cd "$srcdir"/docker-py-"$pkgver"
Felix Yan's avatar
Felix Yan committed
  python setup.py build
}

check() {
  cd "$srcdir"/docker-py-"$pkgver"
Felix Yan's avatar
Felix Yan committed
  py.test --cov=docker tests/unit
}

package() {
  cd docker-py-"$pkgver"
Felix Yan's avatar
Felix Yan committed
  python setup.py install -O1 --root="$pkgdir"
}