* update python-cherrypy to 18.10.0-2

This commit is contained in:
Alexander Baldeck 2024-12-05 07:18:48 +01:00
parent 09e96fa022
commit 157990cab8
3 changed files with 74 additions and 37 deletions

View File

@ -0,0 +1,34 @@
pkgbase = python-cherrypy
pkgdesc = A pythonic, object-oriented web development framework
pkgver = 18.10.0
pkgrel = 2
url = https://cherrypy.dev
arch = any
license = BSD-3-Clause
checkdepends = python-objgraph
checkdepends = python-path
checkdepends = python-pytest
checkdepends = python-pytest-forked
checkdepends = python-pytest-services
checkdepends = python-pytest-sugar
checkdepends = python-requests-toolbelt
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-setuptools-scm
makedepends = python-wheel
depends = python
depends = python-cheroot
depends = python-jaraco.collections
depends = python-more-itertools
depends = python-portend
depends = python-zc.lockfile
optdepends = python-flup: for xcgi support
optdepends = python-memcached: for memcached session support
optdepends = python-pyopenssl: for TLS support
optdepends = python-routes: for routes_dispatcher support
optdepends = python-simplejson: for JSON support
source = python-cherrypy-18.10.0.tar.gz::https://github.com/cherrypy/cherrypy/archive/v18.10.0.tar.gz
sha512sums = 68d44e45037f924c0d3eda93780ee822087a28c9b0dae966e6e8b673479981d6fee0b75d819bc8c863d5085402625bb90afb32ef0ad4ab2f22fdb62ac0341a91
pkgname = python-cherrypy

View File

@ -0,0 +1,3 @@
[python-cherrypy]
source = "pypi"
pypi = "cherrypy"

View File

@ -1,5 +1,6 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Maintainer: Thore Bödecker <foxxx0@archlinux.org>
# Maintainer: Carl Smedstad <carsme@archlinux.org>
# Contributor: Laurent Soest <laurent.soest@gmail.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
@ -9,18 +10,36 @@
pkgname='python-cherrypy'
_pkgname="${pkgname#python-}"
pkgver=18.9.0
pkgver=18.10.0
pkgrel=2
pkgdesc='A pythonic, object-oriented web development framework'
arch=(any)
url='https://cherrypy.dev'
license=('BSD-3-Clause')
depends=('python' 'python-cheroot' 'python-portend' 'python-jaraco.collections'
'python-more-itertools' 'python-zc.lockfile')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-objgraph' 'python-path' 'python-pytest'
'python-pytest-forked' 'python-pytest-services' 'python-pytest-sugar'
'python-requests-toolbelt')
depends=(
'python'
'python-cheroot'
'python-jaraco.collections'
'python-more-itertools'
'python-portend'
'python-zc.lockfile'
)
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
'python-setuptools-scm'
'python-wheel'
)
checkdepends=(
'python-objgraph'
'python-path'
'python-pytest'
'python-pytest-forked'
'python-pytest-services'
'python-pytest-sugar'
'python-requests-toolbelt'
)
optdepends=(
'python-flup: for xcgi support'
'python-memcached: for memcached session support'
@ -28,48 +47,29 @@ optdepends=(
'python-routes: for routes_dispatcher support'
'python-simplejson: for JSON support'
)
source=(
"${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/v$pkgver.tar.gz"
)
sha512sums=('a99ce1b1f86974bd7bee2b74571e4cd90448e5959c9cefe7db13443c78900ec3b99780286464656901773e29deba45f7817d41df6961a272dfa7b259b28c488d')
prepare() {
cd ${_pkgname}-${pkgver}
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
echo "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
fi
done
sed '/setuptools_scm_git_archive/d' -i pyproject.toml
}
source=("$pkgname-$pkgver.tar.gz::https://github.com/cherrypy/cherrypy/archive/v$pkgver.tar.gz")
sha512sums=('68d44e45037f924c0d3eda93780ee822087a28c9b0dae966e6e8b673479981d6fee0b75d819bc8c863d5085402625bb90afb32ef0ad4ab2f22fdb62ac0341a91')
build() {
# setuptools wont find version from git tag
export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}"
cd ${_pkgname}-${pkgver}
python -m build --wheel --no-isolation
cd "$_pkgname-$pkgver"
export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"
python -m build --wheel --no-isolation --skip-dependency-check
}
check() {
cd "$_pkgname-$pkgver"
local pytest_options=(
-vv
-o addopts='' # we are not interested in coverage
-o filterwarnings='' # we don't want to fail on warnings
-o addopts='' # we are not interested in coverage
-o filterwarnings='' # we don't want to fail on warnings
# fails with Python 3.12
--deselect cherrypy/test/test_states.py::test_safe_wait_INADDR_ANY
)
cd ${_pkgname}-${pkgver}
pytest "${pytest_options[@]}"
}
package() {
cd ${_pkgname}-${pkgver}
cd "$_pkgname-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -vDm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}