Skip to content
Snippets Groups Projects
Commit 90810ec8 authored by David Runge's avatar David Runge :chipmunk:
Browse files

Rebuild to clean up dependencies.

Remove unused dependencies.
Switch to pypi sdist tarball to do actual checksum verification.
Simplify test setup in check().
parent bd84de75
No related branches found
Tags 0.27.0-2
No related merge requests found
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
_pkgname=asyncpg
pkgname=python-$_pkgname
_name=asyncpg
pkgname=python-$_name
pkgver=0.27.0
pkgrel=1
pkgrel=2
pkgdesc='A fast PostgreSQL Database Client Library for Python/asyncio'
arch=('x86_64')
url='https://github.com/MagicStack/asyncpg'
license=('Apache')
depends=('python')
makedepends=('git' 'python-setuptools' 'cython')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel' 'cython'
'python-setuptools' 'python-setuptools-scm' 'python-setuptools-scm-git-archive')
checkdepends=('python-pytest-runner' 'python-uvloop' 'postgresql')
source=("git+$url.git#tag=v$pkgver"
'git+https://github.com/MagicStack/py-pgproto.git')
sha512sums=('SKIP'
'SKIP')
makedepends=('cython' 'python-build' 'python-installer' 'python-setuptools'
'python-wheel')
checkdepends=('python-pytest' 'python-pytest-runner' 'python-uvloop' 'postgresql')
options=(debug)
source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
sha512sums=('66d4e16cba8ebebfa0403c7d3b1d3ee1b9b8f55a9b70f57e809d28161873d74750152e6ed548b17ceb97ca84f7a669a5fa503c824a861b295db731f86bfb0137')
b2sums=('e4fe88346a3fb4d9b6ce74a4e12db333f1aefd8844d6b08091a1e507a56754bb74dcbdd1b43329f1df24725f03c808a1862c8c4587c9ec95c4800f30ab78458c')
prepare() {
cd $_pkgname
git submodule init
git config submodule.asyncpg/pgproto.url "$srcdir"/py-pgproto
git -c protocol.file.allow=always submodule update
cd $_name-$pkgver
sed -i "s|'Cython==.*'|'Cython'|" setup.py
}
build() {
cd $_pkgname
cd $_name-$pkgver
python -m build -nw
}
check() {
cd $_pkgname
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
python -m venv --system-site-packages test
cd test/bin
./python -m installer ../../dist/*.whl
cd $_name-$pkgver
./python -m pytest ../../tests
python -m installer --destdir=test_dir dist/*.whl
export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
mv -v $_name $_name-off
pytest -vv tests/
}
package() {
cd $_pkgname
cd $_name-$pkgver
python -m installer -d "$pkgdir" dist/*.whl
install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
# vim:set ts=2 sw=2 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment