This allows us to include a version and we already use PURL for other things, so might as well remove the pypi special case. Normalize the names, since that is required for PURLs.
55 lines
2.2 KiB
Bash
55 lines
2.2 KiB
Bash
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
|
|
|
|
_realname=fastapi
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.115.8
|
|
pkgrel=1
|
|
pkgdesc='FastAPI framework, high performance, easy to learn, fast to code, ready for production (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://github.com/tiangolo/fastapi'
|
|
msys2_references=(
|
|
'purl: pkg:pypi/fastapi'
|
|
"cpe: cpe:2.3:a:fastapi_project:fastapi"
|
|
)
|
|
license=('MIT')
|
|
options=('!strip')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-anyio" # implicitly required for concurrency
|
|
"${MINGW_PACKAGE_PREFIX}-python-pydantic"
|
|
"${MINGW_PACKAGE_PREFIX}-python-starlette")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pdm-backend")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-email-validator: for email validation"
|
|
"${MINGW_PACKAGE_PREFIX}-python-itsdangerous: for SessionMiddleware support"
|
|
"${MINGW_PACKAGE_PREFIX}-python-jinja: for default starlette template configuration"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyyaml: for starlette SchemaGenerator support"
|
|
"${MINGW_PACKAGE_PREFIX}-python-ujson: for faster JSON parsing and UJSONResponse"
|
|
"${MINGW_PACKAGE_PREFIX}-python-websockets: for WebSockets support"
|
|
"${MINGW_PACKAGE_PREFIX}-uvicorn: for Uvicorn as ASGI server")
|
|
source=("${_realname}-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz")
|
|
sha256sums=('0324d60c654c7ad6930195233546b23c80c6899e51824a870ee4465f2ce3b023')
|
|
|
|
prepare() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
msg "Python build for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
"${MINGW_PREFIX}"/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|