|
| 1 | +# Maintainer: Konstantin Podsvirov <[email protected]> |
| 2 | + |
| 3 | +_realname=databases |
| 4 | +pkgbase=mingw-w64-python-${_realname} |
| 5 | +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") |
| 6 | +pkgver=0.7.0 |
| 7 | +pkgrel=1 |
| 8 | +pkgdesc='Async database support for Python (mingw-w64)' |
| 9 | +arch=('any') |
| 10 | +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') |
| 11 | +url='https://github.com/encode/databases' |
| 12 | +license=('BSD') |
| 13 | +depends=("${MINGW_PACKAGE_PREFIX}-python" |
| 14 | + "${MINGW_PACKAGE_PREFIX}-python-sqlalchemy") |
| 15 | +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" |
| 16 | + "git") |
| 17 | +optdepends=("${MINGW_PACKAGE_PREFIX}-python-aiosqlite: sqlite support" |
| 18 | + "${MINGW_PACKAGE_PREFIX}-python-asyncpg: postgresql support") |
| 19 | +#source=("${_realname}-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz") |
| 20 | +#sha256sums=('c938f27865d1cb304838ac0962332b07ee738165b7fd4993907195df1165302c') |
| 21 | + |
| 22 | +# For more info see https://github.com/encode/databases/pull/540 |
| 23 | +_databases_revision=ec987913b8ef815b68629d65ccbd3dc45143efcd |
| 24 | +source=("git+https://github.com/tarsil/databases.git#commit=$_databases_revision") |
| 25 | +sha256sums=('SKIP') |
| 26 | + |
| 27 | +prepare() { |
| 28 | + #cp -r "${srcdir}/${_realname}-${pkgver}" "${srcdir}/python-build-${MSYSTEM}" |
| 29 | + cp -r "${srcdir}/${_realname}" "${srcdir}/python-build-${MSYSTEM}" && cd "${srcdir}/python-build-${MSYSTEM}" |
| 30 | +} |
| 31 | + |
| 32 | +build() { |
| 33 | + msg "Python build for ${MSYSTEM}" |
| 34 | + cd "${srcdir}/python-build-${MSYSTEM}" |
| 35 | + ${MINGW_PREFIX}/bin/python setup.py build |
| 36 | +} |
| 37 | + |
| 38 | +package() { |
| 39 | + cd "${srcdir}/python-build-${MSYSTEM}" |
| 40 | + MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \ |
| 41 | + ${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" -O1 --skip-build |
| 42 | + |
| 43 | + install -Dm644 LICENSE.md ${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.md |
| 44 | +} |
0 commit comments