meson-python: build as a Python package
With meson alone we are missing the Python metadata and other packages can't read the package metadata (for checking the version for example, like python-contourpy does)
This commit is contained in:
parent
c0df806897
commit
837d051dee
@ -4,7 +4,7 @@ _realname=meson-python
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=0.17.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Meson PEP 517 Python build backend (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
@ -19,29 +19,26 @@ depends=("${MINGW_PACKAGE_PREFIX}-meson"
|
||||
"${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-packaging"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pyproject-metadata")
|
||||
makedepends=()
|
||||
makedepends=(
|
||||
"${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
)
|
||||
options=('!strip')
|
||||
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz")
|
||||
sha256sums=('efb91f69f2e19eef7bc9a471ed2a4e730088cc6b39eacaf3e49fc4f930eb5f83')
|
||||
|
||||
build() {
|
||||
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
|
||||
cd "${_realname/-/_}-${pkgver}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
${MINGW_PREFIX}/bin/meson setup \
|
||||
--prefix="${MINGW_PREFIX}" \
|
||||
--wrap-mode=nodownload \
|
||||
--auto-features=enabled \
|
||||
--buildtype=plain \
|
||||
../${_realname/-/_}-${pkgver}
|
||||
|
||||
${MINGW_PREFIX}/bin/meson compile
|
||||
python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
cd "${_realname/-/_}-${pkgver}"
|
||||
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/meson install
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/*.whl
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname/-/_}-${pkgver}/LICENSE" \
|
||||
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user