This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: file:///srv/repos/svn-community/svn@910466 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
1 parent
2460939
commit 0246d2a
Showing
1 changed file
with
14 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,30 @@ | ||
# Maintainer: Felix Yan <felixonmars@archlinux.org> | ||
|
||
pkgbase=python-pyhamcrest | ||
pkgname=('python-pyhamcrest' 'python2-pyhamcrest') | ||
pkgver=1.9.0 | ||
pkgrel=7 | ||
pkgname=python-pyhamcrest | ||
pkgver=1.10.0 | ||
pkgrel=1 | ||
pkgdesc="Hamcrest framework for matcher objects" | ||
arch=('any') | ||
license=('BSD') | ||
url="https://github.com/hamcrest/PyHamcrest" | ||
makedepends=('python-setuptools' 'python2-setuptools') | ||
checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-pytest-cov' | ||
'python2-pytest-cov' 'python-mock' 'python2-mock') | ||
source=("https://pypi.io/packages/source/P/PyHamcrest/PyHamcrest-$pkgver.tar.gz") | ||
sha512sums=('3b8393d0079b619b208ec7f06ed5133c4ff9d9dba050f818adf56347fc2225fd1c85d60f3dc262b7b9722061f0b8e4966180b6b96245a371e578d0d51633b4b0') | ||
|
||
prepare() { | ||
cp -a PyHamcrest-$pkgver{,-py2} | ||
} | ||
depends=('python') | ||
makedepends=('python-setuptools') | ||
checkdepends=('python-pytest' 'python-mock') | ||
source=("https://github.com/hamcrest/PyHamcrest/archive/V$pkgver/$pkgname-$pkgver.tar.gz") | ||
sha512sums=('f218b973911aada45c7abd55e5a2db8c1d1516d608d3edab65c49d5e0155a16aa990c9f0bcce055381542c631d2337f1c3ff4da21f646edb3ea83faaf4977d95') | ||
|
||
build() { | ||
cd "$srcdir"/PyHamcrest-$pkgver | ||
cd PyHamcrest-$pkgver | ||
python setup.py build | ||
|
||
cd "$srcdir"/PyHamcrest-$pkgver-py2 | ||
python2 setup.py build | ||
} | ||
|
||
# Tests not included in release tarball | ||
check_disabled() { | ||
cd "$srcdir"/PyHamcrest-$pkgver | ||
python setup.py pytest | ||
|
||
cd "$srcdir"/PyHamcrest-$pkgver-py2 | ||
python2 setup.py pytest | ||
check() { | ||
cd PyHamcrest-$pkgver | ||
PYTHONPATH="$PWD/build/lib" pytest | ||
} | ||
|
||
package_python-pyhamcrest() { | ||
depends=('python-six') | ||
|
||
package() { | ||
cd PyHamcrest-$pkgver | ||
python setup.py install --root="$pkgdir" --optimize=1 | ||
install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt | ||
} | ||
|
||
package_python2-pyhamcrest() { | ||
depends=('python2-six') | ||
|
||
cd PyHamcrest-$pkgver-py2 | ||
python2 setup.py install --root="$pkgdir" --optimize=1 | ||
install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt | ||
install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ | ||
} |