Skip to content

Commit

Permalink
python-oslo-serialization: update to 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Sep 7, 2023
1 parent 4d0c9f4 commit 9fe877c
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions mingw-w64-python-oslo-serialization/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>

_pyname=oslo.serialization
_realname=oslo-serialization
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=5.1.1
pkgrel=2
pkgver=5.2.0
pkgrel=1
pkgdesc="Oslo Serialization library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://pypi.org/project/oslo.serialization/'
url='https://docs.openstack.org/oslo.serialization/latest'
license=('spdx:Apache-2.0')
depends=("${MINGW_PACKAGE_PREFIX}-python-pbr"
"${MINGW_PACKAGE_PREFIX}-python-msgpack"
"${MINGW_PACKAGE_PREFIX}-python-oslo-utils"
"${MINGW_PACKAGE_PREFIX}-python-pytz")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
"${MINGW_PACKAGE_PREFIX}-python-pytz"
"${MINGW_PACKAGE_PREFIX}-python-tzdata")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-oslotest")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-$pkgver.tar.gz"::"https://github.com/openstack/oslo.serialization/archive/${pkgver}.tar.gz")
sha512sums=('e4803ff22563b5790522cc09831078f071a16345017e2dc2231ba2d2a2dc466f44eed84fe3afb135b7724ce4ca6f4ceac4bcc1ae1c89fdcac6aafa414097caea')
source=("https://pypi.io/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('9cf030d61a6cce1f47a62d4050f5e83e1bd1a1018ac671bb193aee07d15bdbc2')

prepare() {
cd "${srcdir}/oslo.serialization-${pkgver}"
cd "${srcdir}/${_pyname}-${pkgver}"

# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
# set version for pbr
export PBR_VERSION=${pkgver}

cd ${srcdir}
rm -rf python-build-${MSYSTEM} | true
cp -r "${_pyname}-${pkgver}" "python-build-${MSYSTEM}"
}

build() {
cd "${srcdir}/oslo.serialization-${pkgver}"
${MINGW_PREFIX}/bin/python setup.py build
cd "${srcdir}/python-build-${MSYSTEM}"

${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
cd "${srcdir}/oslo.serialization-${pkgver}"
cd "${srcdir}/python-build-${MSYSTEM}"
PYTHON=${MINGW_PREFIX}/bin/python ${MINGW_PREFIX}/bin/stestr run || warning "Tests failed"
}

package() {
cd "${srcdir}/oslo.serialization-${pkgver}"
cd "${srcdir}/python-build-${MSYSTEM}"

MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
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"
}

0 comments on commit 9fe877c

Please sign in to comment.