diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-11 07:02:28 +0100 |
commit | 068424b26532f3551a81421a9be67ed206e5c11a (patch) | |
tree | 583b8d979899a463a4ef5b26d3d49e85df987623 /dev-python/mechanize | |
parent | d162ba1860a88062f4cd61f8b52fc303ba0b2991 (diff) |
gentoo resync : 11.08.2021
Diffstat (limited to 'dev-python/mechanize')
-rw-r--r-- | dev-python/mechanize/Manifest | 2 | ||||
-rw-r--r-- | dev-python/mechanize/files/mechanize-0.4.5-py310.patch | 28 | ||||
-rw-r--r-- | dev-python/mechanize/mechanize-0.4.5-r1.ebuild | 35 |
3 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/mechanize/Manifest b/dev-python/mechanize/Manifest index 23120b171dd4..0ab267790c53 100644 --- a/dev-python/mechanize/Manifest +++ b/dev-python/mechanize/Manifest @@ -1,3 +1,5 @@ +AUX mechanize-0.4.5-py310.patch 900 BLAKE2B 48fcf7baed04e4a2aa32bef01cfab4f8246abace61364fd26d4c90231f6e2ab5924d89b377e6c3a0f5086bcd916e9789a61a5b2aa585665711b97726ecd4b5fa SHA512 1e4262f24ba5ae7238bcf261dfce7cbb851b72fd5daacc37cee570d2172d57d9700802a8c6b8186d7dcdc0cfba583cc136b81fe759513436f393f27159e266c0 DIST mechanize-0.4.5.tar.gz 216908 BLAKE2B 67951ad8295a32799768b3719525d45d502bc773c6f2a5e762e3dae97f309c8c265a2cb3efde95c9e8cb65e89dee6ad6ad8585685baa4e9ff1acfd146f115f6f SHA512 51706d5c073501d02fb7395eda30625ed9191324f948073c7d1589df0e507d8b7641ca514ceff55e7d82e899ba6e10c55507c79668976c7654ff0004671d09d2 +EBUILD mechanize-0.4.5-r1.ebuild 899 BLAKE2B d52600149e9b917568e6c4a54456c957cadd5610487ba3e5d1c3f94df9a7cfb84932dc1c963bf31a38512624be2100c0dd37099eca354898fa29eaabfa5e8630 SHA512 3934498d52761a4d8569ea254f604e9821f8ae618e101b812a44173be646b60811f40cc5f2f693215539133ccd83e9275f9000c6228d4ae0461b4adf93bd4f57 EBUILD mechanize-0.4.5.ebuild 611 BLAKE2B 69ea62451950272b314d4d89c129f7aaaa2eb1934cb69378fcf968052713f5720268ef8e270a42f1b09ad82e4aa5890a9a3d766181faad025f9a8066994187ca SHA512 0447252d02eb41885745d00f313d4377158e4b5329a09e82b40a847fc0e7e523ec0c639e347c45c9949c7b0d8b7427fb8534b2caf75fea54658dd1944fa49e47 MISC metadata.xml 978 BLAKE2B 1c2cb6d7489e09531a0c96862eb12ac53d30b940e940002e69820e7ff51e2fa56d9145d732250d68892690f63663847ff3f711847dd98ee8803fb07e0d5b496c SHA512 ebd61b86ab4c9bbfedd1d1892b3dab26040025f348b56601437999d13817e7147a5b89e3ac8454f6689f3978b289a6893433bde81705d52c4f7d236ea0dd6291 diff --git a/dev-python/mechanize/files/mechanize-0.4.5-py310.patch b/dev-python/mechanize/files/mechanize-0.4.5-py310.patch new file mode 100644 index 000000000000..98656b65425f --- /dev/null +++ b/dev-python/mechanize/files/mechanize-0.4.5-py310.patch @@ -0,0 +1,28 @@ +diff --git a/mechanize/_clientcookie.py b/mechanize/_clientcookie.py +index ebd2773..6c89cbf 100644 +--- a/mechanize/_clientcookie.py ++++ b/mechanize/_clientcookie.py +@@ -188,13 +188,22 @@ class CookieJar(CJ): + raise IndexError() + + ++try: ++ from http.cookiejar import NETSCAPE_MAGIC_RGX, NETSCAPE_HEADER_TEXT ++except ImportError: # python < 3.10 ++ NETSCAPE_MAGIC_RGX = MCJ.magic_re ++ NETSCAPE_HEADER_TEXT = MCJ.header ++else: ++ MCJ.header = NETSCAPE_HEADER_TEXT # needed for tests ++ ++ + class MozillaCookieJar(MCJ): + + def _really_load(self, f, filename, ignore_discard, ignore_expires): + now = time.time() + + magic = f.readline() +- if not re.search(self.magic_re, magic): ++ if not re.search(NETSCAPE_MAGIC_RGX, magic): + f.close() + raise LoadError( + "%r does not look like a Netscape format cookies file" % diff --git a/dev-python/mechanize/mechanize-0.4.5-r1.ebuild b/dev-python/mechanize/mechanize-0.4.5-r1.ebuild new file mode 100644 index 000000000000..01bc41260c68 --- /dev/null +++ b/dev-python/mechanize/mechanize-0.4.5-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit distutils-r1 + +DESCRIPTION="Stateful programmatic web browsing in Python" +HOMEPAGE="https://github.com/python-mechanize/mechanize" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="|| ( BSD ZPL )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=">=dev-python/html5lib-0.999999999[${PYTHON_USEDEP}]" +BDEPEND=" + test? ( + ${RDEPEND} + ) +" + +PATCHES=( + # https://github.com/python-mechanize/mechanize/commit/2a563ec4fbc394ec5976dda0f528db43d28a2706 + # https://github.com/python-mechanize/mechanize/commit/bc6a2ca7b17e11f2533ada67f0bf92124d4a3cac + "${FILESDIR}/${P}-py310.patch" +) + +python_test() { + "${EPYTHON}" run_tests.py || die +} |