summaryrefslogtreecommitdiff
path: root/dev-python/boltons
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-python/boltons
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-python/boltons')
-rw-r--r--dev-python/boltons/Manifest4
-rw-r--r--dev-python/boltons/boltons-21.0.0.ebuild25
-rw-r--r--dev-python/boltons/files/boltons-21.0.0-python3.10.patch110
-rw-r--r--dev-python/boltons/metadata.xml13
4 files changed, 152 insertions, 0 deletions
diff --git a/dev-python/boltons/Manifest b/dev-python/boltons/Manifest
new file mode 100644
index 000000000000..7979ff8709a1
--- /dev/null
+++ b/dev-python/boltons/Manifest
@@ -0,0 +1,4 @@
+AUX boltons-21.0.0-python3.10.patch 3393 BLAKE2B 24d9bf2368a0716332e85222fcf8965b9633aa26967e9f9bac6f5ee31fbd8aa71dc2e24bfeeaa6ad766511f8f09a68a1b4288fa66b9ab7ec58f1e01453d5adae SHA512 3db60c0a2cd8680fc58151ad788838b6d795c16b5162326382aba883a7fe86a294cc1d490d40ff40ecd3eecb37e518c85bee0c67910938e8d3623f0dc5f6d6df
+DIST boltons-21.0.0.tar.gz 241010 BLAKE2B e8c7cba3aadc40fbf40b784c8060d7b4f9d89457a4416c8fe9c733c3a35cf292609b2cc4e43e20a1308add6b854c3e00cb55274328a14699b3c704b73c189318 SHA512 5f5d642ab8ce0bc26133f4bd5059071bc86ca8e6619ebac796d522a0e4c39b958176ccc9de9a56e0448b24bdcf569e73f51011d5a9fc875bdef12a363f106018
+EBUILD boltons-21.0.0.ebuild 615 BLAKE2B 8d1c72ecafbb877e306fee4467f57fbc231fc92dc9800d44fdbc0f16094e691a6db985cb41c46a6c449258df077cc6424dd149f6da6c43d7779fcb7002b38183 SHA512 cc8094aebcb1ddc24f10ba1765e0ce35f9bd0595d17ca85ae25997c21076cfd1db604f9d2158be6ea7a1ae758b70204f7d97849353f3c1d5dc432fe41f6310cc
+MISC metadata.xml 395 BLAKE2B 6ed304f1dced75dfd795b9fe582ec669bf1c8ba5fefeb9e753b11aa20de8fc0966fc9a8a0ed40e460dd23a67ef0e5721a8dae27b3d799a4be629537bb18f54c9 SHA512 fb73041a95df230153dc686e21a88d91bb06367ae8c22a20777c4a0f13202cbaf59396f4ed2630265d331d6461a6da85f57ba62cc432c4d9105b8404753b383b
diff --git a/dev-python/boltons/boltons-21.0.0.ebuild b/dev-python/boltons/boltons-21.0.0.ebuild
new file mode 100644
index 000000000000..ce1998c8a880
--- /dev/null
+++ b/dev-python/boltons/boltons-21.0.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Pure-python utilities in the same spirit as the standard library"
+HOMEPAGE="https://boltons.readthedocs.org/"
+SRC_URI="https://github.com/mahmoud/boltons/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs \
+ dev-python/sphinx_rtd_theme
+
+DOCS=( CHANGELOG.md README.md TODO.rst )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-python3.10.patch
+)
diff --git a/dev-python/boltons/files/boltons-21.0.0-python3.10.patch b/dev-python/boltons/files/boltons-21.0.0-python3.10.patch
new file mode 100644
index 000000000000..2e9974a71c9e
--- /dev/null
+++ b/dev-python/boltons/files/boltons-21.0.0-python3.10.patch
@@ -0,0 +1,110 @@
+https://github.com/mahmoud/boltons/commit/270e974
+From: Mahmoud Hashemi <mahmoud@hatnote.com>
+Date: Sun, 10 Oct 2021 23:26:24 -0700
+Subject: [PATCH] address ecoutils import issue, fixes #294
+--- a/boltons/ecoutils.py
++++ b/boltons/ecoutils.py
+@@ -354,38 +354,53 @@ def get_profile(**kwargs):
+ return ret
+
+
+-_real_safe_repr = pprint._safe_repr
+-
+-
+-def _fake_json_dumps(val, indent=2):
+- # never do this. this is a hack for Python 2.4. Python 2.5 added
+- # the json module for a reason.
+- def _fake_safe_repr(*a, **kw):
+- res, is_read, is_rec = _real_safe_repr(*a, **kw)
+- if res == 'None':
+- res = 'null'
+- if res == 'True':
+- res = 'true'
+- if res == 'False':
+- res = 'false'
+- if not (res.startswith("'") or res.startswith("u'")):
+- res = res
+- else:
+- if res.startswith('u'):
+- res = res[1:]
++try:
++ import json
++
++ def dumps(val, indent):
++ if indent:
++ return json.dumps(val, sort_keys=True, indent=indent)
++ return json.dumps(val, sort_keys=True)
++
++except ImportError:
++ _real_safe_repr = pprint._safe_repr
++
++ def _fake_json_dumps(val, indent=2):
++ # never do this. this is a hack for Python 2.4. Python 2.5 added
++ # the json module for a reason.
++ def _fake_safe_repr(*a, **kw):
++ res, is_read, is_rec = _real_safe_repr(*a, **kw)
++ if res == 'None':
++ res = 'null'
++ if res == 'True':
++ res = 'true'
++ if res == 'False':
++ res = 'false'
++ if not (res.startswith("'") or res.startswith("u'")):
++ res = res
++ else:
++ if res.startswith('u'):
++ res = res[1:]
+
+- contents = res[1:-1]
+- contents = contents.replace('"', '').replace(r'\"', '')
+- res = '"' + contents + '"'
+- return res, is_read, is_rec
++ contents = res[1:-1]
++ contents = contents.replace('"', '').replace(r'\"', '')
++ res = '"' + contents + '"'
++ return res, is_read, is_rec
+
+- pprint._safe_repr = _fake_safe_repr
+- try:
+- ret = pprint.pformat(val, indent=indent)
+- finally:
+- pprint._safe_repr = _real_safe_repr
++ pprint._safe_repr = _fake_safe_repr
++ try:
++ ret = pprint.pformat(val, indent=indent)
++ finally:
++ pprint._safe_repr = _real_safe_repr
++
++ return ret
++
++ def dumps(val, indent):
++ ret = _fake_json_dumps(val, indent=indent)
++ if not indent:
++ ret = re.sub(r'\n\s*', ' ', ret)
++ return ret
+
+- return ret
+
+
+ def get_profile_json(indent=False):
+@@ -393,20 +408,6 @@ def get_profile_json(indent=False):
+ indent = 2
+ else:
+ indent = 0
+- try:
+- import json
+-
+- def dumps(val, indent):
+- if indent:
+- return json.dumps(val, sort_keys=True, indent=indent)
+- return json.dumps(val, sort_keys=True)
+-
+- except ImportError:
+- def dumps(val, indent):
+- ret = _fake_json_dumps(val, indent=indent)
+- if not indent:
+- ret = re.sub(r'\n\s*', ' ', ret)
+- return ret
+
+ data_dict = get_profile()
+ return dumps(data_dict, indent)
diff --git a/dev-python/boltons/metadata.xml b/dev-python/boltons/metadata.xml
new file mode 100644
index 000000000000..769cd6689ddf
--- /dev/null
+++ b/dev-python/boltons/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ionen@gentoo.org</email>
+ <name>Ionen Wolkens</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">mahmoud/boltons</remote-id>
+ <remote-id type="pypi">boltons</remote-id>
+ </upstream>
+</pkgmetadata>