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.1 KiB
Bash
55 lines
2.1 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_pyname=oslo.serialization
|
|
_realname=oslo-serialization
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=5.6.0
|
|
pkgrel=1
|
|
pkgdesc="Oslo Serialization library (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_references=(
|
|
'archlinux: python-oslo-serialization'
|
|
'purl: pkg:pypi/oslo-serialization'
|
|
)
|
|
msys2_repository_url='https://opendev.org/openstack/oslo.serialization'
|
|
msys2_changelog_url='https://docs.openstack.org/releasenotes/oslo.serialization/'
|
|
msys2_documentation_url='https://docs.openstack.org/oslo.serialization/latest/'
|
|
msys2_issue_tracker_url='https://bugs.launchpad.net/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-tzdata")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-oslotest")
|
|
source=("https://pypi.io/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
|
|
sha256sums=('4c7d4e12da853cc4f04b9123041134e886e8c9ff57ab57c1962d3ad4a87b7f7c')
|
|
|
|
build() {
|
|
# set version for pbr
|
|
export PBR_VERSION=${pkgver}
|
|
|
|
cp -r "${_pyname}-${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"
|
|
}
|