diff options
Diffstat (limited to 'dev-python/bottle')
-rw-r--r-- | dev-python/bottle/Manifest | 2 | ||||
-rw-r--r-- | dev-python/bottle/bottle-0.12.19.ebuild | 47 | ||||
-rw-r--r-- | dev-python/bottle/bottle-0.12.25-r1.ebuild | 50 | ||||
-rw-r--r-- | dev-python/bottle/files/bottle-0.12.25-py312.patch | 35 | ||||
-rw-r--r-- | dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch | 36 | ||||
-rw-r--r-- | dev-python/bottle/metadata.xml | 17 |
6 files changed, 95 insertions, 92 deletions
diff --git a/dev-python/bottle/Manifest b/dev-python/bottle/Manifest index 81c2815a03e3..f3903aaa686c 100644 --- a/dev-python/bottle/Manifest +++ b/dev-python/bottle/Manifest @@ -1 +1 @@ -DIST bottle-0.12.19.tar.gz 73142 BLAKE2B e59d7a507d3401869ba4953a48274062fc56226afa2f7aad596b4ef4352e4a79cea2d224dfe32d7ce014e4f4a3ba088d0e7a0886f64a84bb6b78571e953fa3c3 SHA512 e5d2f6a32d1b89ae3cc9607456c0614db2b58882c6d36273d695c51d3d77b1858cac4d914dbf19bca3b74be68c197aa6473f162e40d9b7ae2af3a084a28c2637 +DIST bottle-0.12.25.tar.gz 74231 BLAKE2B 2856d94e1525f21e272d70ca3101188ea65417179342d7b3e971c5d1a3be77265e4197e5d29764a5739adbd984883ed121524f29e6a5933b8681e2c34b511a57 SHA512 14b8ed1ffd58f9667d451872ccf73a6f4bf8f7ffb9329f55314f90c770630cfe3f9956f786bcc7fd5f67fde22d14961952969af405912ebe71f019ca6599c975 diff --git a/dev-python/bottle/bottle-0.12.19.ebuild b/dev-python/bottle/bottle-0.12.19.ebuild deleted file mode 100644 index 4a7ace2670ef..000000000000 --- a/dev-python/bottle/bottle-0.12.19.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..10} pypy3 ) - -inherit distutils-r1 optfeature - -DESCRIPTION="A fast and simple micro-framework for small web-applications" -HOMEPAGE="https://pypi.org/project/bottle/ https://bottlepy.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND="test? ( dev-python/mako[${PYTHON_USEDEP}] )" - -PATCHES=( - "${FILESDIR}"/${PN}-0.12.8-py3.5-backport.patch -) - -python_prepare_all() { - sed -i -e '/scripts/d' setup.py || die - - # Remove test file requring connection to network - rm test/test_server.py || die - distutils-r1_python_prepare_all -} - -python_test() { - # A few odd fails in the suite under pypy - # https://github.com/bottlepy/bottle/issues/714 - "${EPYTHON}" test/testall.py || die "tests failed under ${EPYTHON}" -} - -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/bottle-0.12.25-r1.ebuild b/dev-python/bottle/bottle-0.12.25-r1.ebuild new file mode 100644 index 000000000000..6c0982822759 --- /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 + diff --git a/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch b/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch deleted file mode 100644 index 86e1ac04bc41..000000000000 --- a/dev-python/bottle/files/bottle-0.12.8-py3.5-backport.patch +++ /dev/null @@ -1,36 +0,0 @@ - test/test_environ.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/test/test_environ.py b/test/test_environ.py -old mode 100755 -new mode 100644 -index 2b8079b..2feebe3 ---- a/test/test_environ.py -+++ b/test/test_environ.py -@@ -592,7 +592,7 @@ class TestResponse(unittest.TestCase): - r.set_cookie('name2', 'value', max_age=datetime.timedelta(days=1)) - cookies = sorted([value for name, value in r.headerlist - if name.title() == 'Set-Cookie']) -- self.assertEqual(cookies[0], 'name1=value; Max-Age=5') -+ self.assertEqual(cookies[0].lower(), 'name1=value; max-age=5') - self.assertEqual(cookies[1], 'name2=value; Max-Age=86400') - - def test_set_cookie_expires(self): -@@ -602,7 +602,7 @@ class TestResponse(unittest.TestCase): - r.set_cookie('name2', 'value', expires=datetime.datetime(1970,1,1,0,0,43)) - cookies = sorted([value for name, value in r.headerlist - if name.title() == 'Set-Cookie']) -- self.assertEqual(cookies[0], 'name1=value; expires=Thu, 01 Jan 1970 00:00:42 GMT') -+ self.assertEqual(cookies[0].lower(), 'name1=value; expires=thu, 01 jan 1970 00:00:42 gmt') - self.assertEqual(cookies[1], 'name2=value; expires=Thu, 01 Jan 1970 00:00:43 GMT') - - def test_delete_cookie(self): -@@ -611,7 +611,7 @@ class TestResponse(unittest.TestCase): - response.delete_cookie('name') - cookies = [value for name, value in response.headerlist - if name.title() == 'Set-Cookie'] -- self.assertTrue('name=;' in cookies[0]) -+ self.assertTrue('Max-Age=-1' in cookies[0]) - - def test_set_header(self): - response = BaseResponse() diff --git a/dev-python/bottle/metadata.xml b/dev-python/bottle/metadata.xml index 77a8953e987f..c1750f0a3e4f 100644 --- a/dev-python/bottle/metadata.xml +++ b/dev-python/bottle/metadata.xml @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="project"> - <email>python@gentoo.org</email> - <name>Python</name> - </maintainer> - <stabilize-allarches/> - <upstream> - <remote-id type="pypi">bottle</remote-id> - </upstream> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="pypi">bottle</remote-id> + <remote-id type="github">bottlepy/bottle</remote-id> + </upstream> </pkgmetadata> |