upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-cherrypy / repos / community-any / PKGBUILD
blob36f3c4ce27dc9864d2df1df446dafb649ce519cc
1 # Maintainer:  Thore Bödecker <foxxx0@archlinux.org>
2 # Contributor: Laurent Soest <laurent.soest@gmail.com>
3 # Contributor: Angel Velasquez <angvp@archlinux.org>
4 # Contributor: Kaiting Chen <kaitocracy@gmail.com>
5 # Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
6 # Contributor: Armando M. Baratti <amblistas@ajato.com.br>
7 # Contributor: Florian Richter <Florian_Richter@gmx.de>
9 pkgname='python-cherrypy'
10 _pkgname="${pkgname#python-}"
11 pkgver=18.8.0
12 pkgrel=3
13 pkgdesc='A pythonic, object-oriented web development framework'
14 arch=('any')
15 url='https://cherrypy.dev'
16 license=('BSD')
17 depends=('python' 'python-cheroot' 'python-portend' 'python-jaraco.collections'
18 'python-more-itertools' 'python-zc.lockfile')
19 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm' 'python-wheel')
20 checkdepends=('python-objgraph' 'python-path' 'python-pytest'
21 'python-pytest-forked' 'python-pytest-services' 'python-pytest-sugar'
22 'python-requests-toolbelt')
23 optdepends=(
24   'python-flup: for xcgi support'
25   'python-memcached: for memcached session support'
26   'python-pyopenssl: for TLS support'
27   'python-routes: for routes_dispatcher support'
28   'python-simplejson: for JSON support'
30 source=(
31   "${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/v$pkgver.tar.gz"
32   'disable-sessiontest-file_concurrency.patch'
33   'disable-broken-testCombinedTools.patch' # https://github.com/cherrypy/cherrypy/issues/1849
34   'disable-broken-ServerStateTests.test_2_KeyboardInterrupt.patch' # https://github.com/cherrypy/cherrypy/issues/1873
36 sha512sums=('54e815d91bacc9710cc2962be2640d7e74b872fb69ab235b217481425fa6fa854d4997ec67ca6e4d3f8f70a995b93c532b909a3feffbfdb149f850a4fa047fad'
37             'e8abb7e3f8a064a0da529fcaf393dff305541bc273b539f3129b119d506be3be8cd67894dd4223e067b4dd8b55df8adc5d4feddb8d87188c9e528670c39e252f'
38             '8160f7a0e43042c233af22712641724bbaff63d603b31eb3f058c810d2b8f1ca0f5a4666464e4492457bb665ebe0eb5da55bc7e8158e36968f5ccb08ad641733'
39             '60ba651c113ecf32e865a40b9361dbe176200274f2b3f40f6d17cbea3d4a868dc2eaf6088906230417c423969ce9692c10ae1f2e0f045571e5c443b53d4e07ca')
41 prepare() {
42   cd ${_pkgname}-${pkgver}
43   # apply patch from the source array (should be a pacman feature)
44   local filename
45   for filename in "${source[@]}"; do
46     if [[ "$filename" =~ \.patch$ ]]; then
47       echo "Applying patch ${filename##*/}"
48       patch -p1 -N -i "$srcdir/${filename##*/}"
49     fi
50   done
51   # we are not interested in coverage tests
52   sed -e '/cov/d' -i pytest.ini
55 build() {
56   # setuptools wont find version from git tag
57   export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}"
59   cd ${_pkgname}-${pkgver}
60   python -m build --wheel --no-isolation
63 check() {
64   cd ${_pkgname}-${pkgver}
65   # disable tests that fail due to escalated DeprecationWarnings due to calls to StringIO.readfp()
66   # TODO: report upstream!
67   pytest -vv \
68     -k "not testConfig \
69         and not testCustomNamespaces \
70         and not testHandlerToolConfigOverride \
71         and not testHandlerToolConfigOverride \
72         and not testRespNamespaces \
73         and not testUnrepr \
74         and not test_request_body_namespace \
75         and not test_gc \
76         and not test_config \
77         and not test_call_with_kwargs \
78         and not test_call_with_literal_dict"
81 package() {
82   cd ${_pkgname}-${pkgver}
83   python -m installer --destdir="$pkgdir" dist/*.whl
84   install -vDm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"