summaryrefslogtreecommitdiff
path: root/dev-python/bottle
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-28 21:15:34 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-28 21:15:34 +0100
commit14bda3c9c57c13e8a59303f400678313fd770bdd (patch)
tree1d76323e4e249e0515128cd6ca42e167a9575294 /dev-python/bottle
parente5346f2f512bd7faf413f3de3ef7fbcfbcd974b3 (diff)
gentoo auto-resync : 28:05:2023 - 21:15:34
Diffstat (limited to 'dev-python/bottle')
-rw-r--r--dev-python/bottle/Manifest2
-rw-r--r--dev-python/bottle/bottle-0.12.25-r1.ebuild50
-rw-r--r--dev-python/bottle/files/bottle-0.12.25-py312.patch35
3 files changed, 87 insertions, 0 deletions
diff --git a/dev-python/bottle/Manifest b/dev-python/bottle/Manifest
index ab5002accdbb..5093fd43fc3c 100644
--- a/dev-python/bottle/Manifest
+++ b/dev-python/bottle/Manifest
@@ -1,3 +1,5 @@
+AUX bottle-0.12.25-py312.patch 1086 BLAKE2B fb0b854bca7b7671046647c3bd3048053db5500de86bf9bbf11c59ca37a161914804012a6379509bea2bcc4cb82c1c9f5faf97aca95d970297a0e72326605208 SHA512 85c9090dcad1edc8098c451b4dc1afc0f6edb5e7e38cfa3901f50a13ba9066dac338660e1419fd4eb7f0ce6d9ae496c89d7cfa47cb55f7038bd957a581132663
DIST bottle-0.12.25.tar.gz 74231 BLAKE2B 2856d94e1525f21e272d70ca3101188ea65417179342d7b3e971c5d1a3be77265e4197e5d29764a5739adbd984883ed121524f29e6a5933b8681e2c34b511a57 SHA512 14b8ed1ffd58f9667d451872ccf73a6f4bf8f7ffb9329f55314f90c770630cfe3f9956f786bcc7fd5f67fde22d14961952969af405912ebe71f019ca6599c975
+EBUILD bottle-0.12.25-r1.ebuild 1276 BLAKE2B c716d98d93269ef517113e795f71d1982bb78f2089843e1aec90edffbf5a14bc0e9a58fe30bcb6ca5db00e5ae80fe5a6ba956363a3540d010856fb98aca95c35 SHA512 e1c488410355ce718641bc83cb1ba590363d1d52e731065e1259aa0b00cbb9fe53e4cac00f80c1f409481f24d3a6e58a8bccc925300847f963597f4e39442245
EBUILD bottle-0.12.25.ebuild 1172 BLAKE2B b0ace31e5a99184058eb45c2729959b815aa25ca72e2de7aa9d927bbd7ae85f2c31032e593736af5acb587fd77b1faf42b7029991c53537515b1a3761b33cfcb SHA512 9404584cd41aba2d36878bf8e0dcb4aaf0afd1f6c5bc83043461fd09f74a801e79ef0ed4daceb6508dca342606090af503f6f608509baf1764792586fd53da00
MISC metadata.xml 389 BLAKE2B fa960ae3a5dbead30cd7bc7617f87d5f2597716f6edef3a2af4ab15a7f45cfab6db98d77335a24fd792a6161dde7b7ff183d934e19cf69f7e1b2c72485cafd00 SHA512 06b65bd22b74e1e77597e65872d6ecc471e97848b05c02a0e2d35f98499d4c56164a15093ea96b9e55a59ed2624bed2adfb45d58d4a79c426087ca2ddf89f6b4
diff --git a/dev-python/bottle/bottle-0.12.25-r1.ebuild b/dev-python/bottle/bottle-0.12.25-r1.ebuild
new file mode 100644
index 000000000000..8cbff0a525a7
--- /dev/null
+++ b/dev-python/bottle/bottle-0.12.25-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 optfeature pypi
+
+DESCRIPTION="A fast and simple micro-framework for small web-applications"
+HOMEPAGE="
+ https://bottlepy.org/
+ https://github.com/bottlepy/bottle/
+ https://pypi.org/project/bottle/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+BDEPEND="
+ test? (
+ dev-python/mako[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ # https://github.com/bottlepy/bottle/issues/1422
+ "${FILESDIR}/${P}-py312.patch"
+)
+
+distutils_enable_tests unittest
+
+python_prepare_all() {
+ sed -e '/scripts/d' -i setup.py || die
+
+ # Remove test file requiring connection to network
+ rm test/test_server.py || die
+ distutils-r1_python_prepare_all
+}
+
+pkg_postinst() {
+ optfeature "Templating support" dev-python/mako
+ elog "Due to problems with bottle.py being in /usr/bin (see bug #474874)"
+ elog "we do as most other distros and do not install the script anymore."
+ elog "If you do want/have to call it directly rather than through your app,"
+ elog "please use the following instead:"
+ elog ' `python -m bottle`'
+}
diff --git a/dev-python/bottle/files/bottle-0.12.25-py312.patch b/dev-python/bottle/files/bottle-0.12.25-py312.patch
new file mode 100644
index 000000000000..717463841af5
--- /dev/null
+++ b/dev-python/bottle/files/bottle-0.12.25-py312.patch
@@ -0,0 +1,35 @@
+From ca6762c559c5e71e0dff71dc97eb4c6b3ed9bbcd Mon Sep 17 00:00:00 2001
+From: Marcel Hellkamp <marc@gsites.de>
+Date: Sun, 12 Jun 2022 15:15:35 +0200
+Subject: [PATCH] Fix #1378: Module loader should move from find_mdoule to
+ find_spec.
+
+---
+ bottle.py | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/bottle.py b/bottle.py
+index 8e7e3d7..63e55cf 100755
+--- a/bottle.py
++++ b/bottle.py
+@@ -2068,10 +2068,15 @@ class _ImportRedirect(object):
+ })
+ sys.meta_path.append(self)
+
++ def find_spec(self, fullname, path, target=None):
++ if '.' not in fullname: return
++ if fullname.rsplit('.', 1)[0] != self.name: return
++ from importlib.util import spec_from_loader
++ return spec_from_loader(fullname, self)
++
+ def find_module(self, fullname, path=None):
+ if '.' not in fullname: return
+- packname = fullname.rsplit('.', 1)[0]
+- if packname != self.name: return
++ if fullname.rsplit('.', 1)[0] != self.name: return
+ return self
+
+ def load_module(self, fullname):
+--
+2.40.1
+