Christoph Reiter 133c1c6a63
Various Python package updates (#25423)
* Various Python package updates

* python-poetry: fix checksum of patch file

---------

Co-authored-by: Dirk Stolle <striezel-dev@web.de>
2025-09-08 17:02:03 +02:00

64 lines
2.3 KiB
Bash

# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=oslo-log
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=7.2.1
pkgrel=1
pkgdesc="Oslo Logging Library (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'archlinux: python-oslo-log'
'purl: pkg:pypi/oslo-log'
)
msys2_repository_url='https://opendev.org/openstack/oslo.log/'
msys2_changelog_url='https://docs.openstack.org/releasenotes/oslo.log/'
msys2_documentation_url='https://docs.openstack.org/oslo.log/latest/'
msys2_issue_tracker_url='https://bugs.launchpad.net/oslo.log/'
url='https://docs.openstack.org/oslo.log/latest/'
license=('spdx:Apache-2.0')
depends=("${MINGW_PACKAGE_PREFIX}-python-pbr"
"${MINGW_PACKAGE_PREFIX}-python-oslo-config"
"${MINGW_PACKAGE_PREFIX}-python-oslo-context"
"${MINGW_PACKAGE_PREFIX}-python-oslo-i18n"
"${MINGW_PACKAGE_PREFIX}-python-oslo-utils"
"${MINGW_PACKAGE_PREFIX}-python-oslo-serialization"
"${MINGW_PACKAGE_PREFIX}-python-debtcollector"
"${MINGW_PACKAGE_PREFIX}-python-dateutil")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-oslotest")
options=(!strip)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname/-/_}/${_realname/-/_}-${pkgver}.tar.gz")
sha256sums=('01aebabdcf06b62df00e479db99df0c23f6cd24c6500ab3110e604bd059fa8d5')
prepare() {
cd "${srcdir}/${_realname/-/_}-${pkgver}"
sed -i 's/unittest2/unittest/g' oslo_log/tests/unit/*.py
# Set version for pbr
export PBR_VERSION=${pkgver}
}
build() {
cp -r "${_realname/-/_}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${srcdir}/python-build-${MSYSTEM}"
PYTHON=${MINGW_PREFIX}/bin/python ${MINGW_PREFIX}/bin/stestr run || warning "Tests failed"
}
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"
}