Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/bottle/
Date: Fri, 13 May 2022 09:08:17
Message-Id: 1652432879.e93edd0ec3da40c4ffed71bcad6c5bacb72450df.mgorny@gentoo
1 commit: e93edd0ec3da40c4ffed71bcad6c5bacb72450df
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 13 07:49:53 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri May 13 09:07:59 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e93edd0e
7
8 dev-python/bottle: Use PEP517 build
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/bottle/bottle-0.12.19-r1.ebuild | 54 ++++++++++++++++++++++++++++++
13 1 file changed, 54 insertions(+)
14
15 diff --git a/dev-python/bottle/bottle-0.12.19-r1.ebuild b/dev-python/bottle/bottle-0.12.19-r1.ebuild
16 new file mode 100644
17 index 000000000000..d5e33bff5880
18 --- /dev/null
19 +++ b/dev-python/bottle/bottle-0.12.19-r1.ebuild
20 @@ -0,0 +1,54 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +DISTUTILS_USE_PEP517=setuptools
27 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
28 +
29 +inherit distutils-r1 optfeature
30 +
31 +DESCRIPTION="A fast and simple micro-framework for small web-applications"
32 +HOMEPAGE="
33 + https://bottlepy.org/
34 + https://github.com/bottlepy/bottle/
35 + https://pypi.org/project/bottle/
36 +"
37 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
38 +
39 +LICENSE="MIT"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
42 +IUSE="test"
43 +RESTRICT="!test? ( test )"
44 +
45 +BDEPEND="
46 + test? (
47 + dev-python/mako[${PYTHON_USEDEP}]
48 + )
49 +"
50 +
51 +PATCHES=(
52 + "${FILESDIR}"/${PN}-0.12.8-py3.5-backport.patch
53 +)
54 +
55 +python_prepare_all() {
56 + sed -i -e '/scripts/d' setup.py || die
57 +
58 + # Remove test file requring connection to network
59 + rm test/test_server.py || die
60 + distutils-r1_python_prepare_all
61 +}
62 +
63 +python_test() {
64 + "${EPYTHON}" test/testall.py || die "tests failed under ${EPYTHON}"
65 +}
66 +
67 +pkg_postinst() {
68 + optfeature "Templating support" dev-python/mako
69 + elog "Due to problems with bottle.py being in /usr/bin (see bug #474874)"
70 + elog "we do as most other distros and do not install the script anymore."
71 + elog "If you do want/have to call it directly rather than through your app,"
72 + elog "please use the following instead:"
73 + elog ' `python -m bottle`'
74 +}