# Contributor: Carlo Landmeter # Maintainer: Carlo Landmeter pkgname=py3-mysqlclient pkgver=2.2.0 pkgrel=0 pkgdesc="MySQL database connector for Python (with py3 support)" url="https://mysqlclient.readthedocs.io/" arch="all" license="GPL-2.0-or-later" makedepends=" mariadb-dev py3-gpep517 py3-setuptools py3-wheel python3-dev " checkdepends="py3-pytest" subpackages="$pkgname-pyc" source="mysqlclient-python-$pkgver.tar.gz::https://github.com/PyMySQL/mysqlclient-python/archive/v$pkgver.tar.gz" builddir="$srcdir/mysqlclient-$pkgver" options="!check" # tests need net replaces="py-mysqlclient" # Backwards compatibility provides="py-mysqlclient=$pkgver-r$pkgrel" # Backwards compatibility build() { gpep517 build-wheel \ --wheel-dir .dist \ --output-fd 3 3>&1 >&2 } check() { python3 -m venv --clear --without-pip --system-site-packages .testenv .testenv/bin/python3 -m installer .dist/*.whl .testenv/bin/python3 -m pytest } package() { python3 -m installer -d "$pkgdir" \ .dist/*.whl rm "$pkgdir"/usr/lib/python*/site-packages/MySQLdb/_mysql.c } sha512sums=" e5a3084a1a7f1a8092b117599135dba05f2a61c6c23d50ec253e18b9bce73c70a7fc2388954676b618b1ac3718ea92600d1b68c0172924f0ca0422f9e00b0e0b mysqlclient-python-2.2.0.tar.gz "