summaryrefslogtreecommitdiff
path: root/dev-python/ipdb
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-10-14 13:02:57 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-10-14 13:02:57 +0000
commit61b6ef17e24c830bc291e361f9dd6abc03074f80 (patch)
tree8380e8eaad8815eeed187bea20e16a45d9192aa5 /dev-python/ipdb
parentc47f2fda56ca52560ec95d75c283ce5f300f6214 (diff)
downloadbaldeagleos-repo-61b6ef17e24c830bc291e361f9dd6abc03074f80.tar.gz
baldeagleos-repo-61b6ef17e24c830bc291e361f9dd6abc03074f80.tar.xz
baldeagleos-repo-61b6ef17e24c830bc291e361f9dd6abc03074f80.zip
Adding metadata
Diffstat (limited to 'dev-python/ipdb')
-rw-r--r--dev-python/ipdb/files/ipdb-0.13.9-tomli.patch54
-rw-r--r--dev-python/ipdb/ipdb-0.13.9-r3.ebuild (renamed from dev-python/ipdb/ipdb-0.13.9-r2.ebuild)22
2 files changed, 72 insertions, 4 deletions
diff --git a/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch b/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch
new file mode 100644
index 000000000000..20eecdd8721c
--- /dev/null
+++ b/dev-python/ipdb/files/ipdb-0.13.9-tomli.patch
@@ -0,0 +1,54 @@
+From bc06e22817f2644c6ecc838f60c93fbedb9e0016 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 12 Oct 2022 16:57:24 +0200
+Subject: [PATCH] Support tomllib/tomli in newer Python versions
+
+Support the built-in `tomllib` module from Python 3.11 and the modern
+TOML processing library `tomli` in newer versions of Python 3. The old
+`toml` package is unmaintained and does not implement TOML 1.0
+correctly.
+---
+ ipdb/__main__.py | 14 ++++++++++++--
+ setup.py | 4 ++--
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/ipdb/__main__.py b/ipdb/__main__.py
+index ea2ae88..2c3f675 100644
+--- a/ipdb/__main__.py
++++ b/ipdb/__main__.py
+@@ -176,8 +176,18 @@ def get_config():
+ read_func(f)
+ # To use on pyproject.toml, put [tool.ipdb] section
+ elif filepath.endswith('pyproject.toml'):
+- import toml
+- toml_file = toml.load(filepath)
++ try:
++ if sys.version_info >= (3, 11):
++ import tomllib
++ else:
++ import tomli as tomllib
++
++ with open(filepath, "rb") as f:
++ toml_file = tomllib.load(f)
++ except ImportError:
++ import toml
++ toml_file = toml.load(filepath)
++
+ if "tool" in toml_file and "ipdb" in toml_file["tool"]:
+ if not parser.has_section("ipdb"):
+ parser.add_section("ipdb")
+diff --git a/setup.py b/setup.py
+index 6ce51c0..04f594c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -64,8 +64,8 @@
+ # FTR, `decorator` is also a dependency of Ipython.
+ ':python_version == "3.4"': ['ipython >= 6.0.0, < 7.0.0', 'toml >= 0.10.2', 'decorator < 5.0.0'],
+ ':python_version == "3.5"': ['ipython >= 7.0.0, < 7.10.0', 'toml >= 0.10.2', 'decorator'],
+- ':python_version == "3.6"': ['ipython >= 7.10.0, < 7.17.0', 'toml >= 0.10.2', 'decorator'],
+- ':python_version > "3.6"': ['ipython >= 7.17.0', 'toml >= 0.10.2', 'decorator'],
++ ':python_version == "3.6"': ['ipython >= 7.10.0, < 7.17.0', 'tomli', 'decorator'],
++ ':python_version > "3.6"': ['ipython >= 7.17.0', 'tomli', 'decorator'],
+ },
+ tests_require=[
+ 'mock; python_version<"3"'
diff --git a/dev-python/ipdb/ipdb-0.13.9-r2.ebuild b/dev-python/ipdb/ipdb-0.13.9-r3.ebuild
index 7bdb9d7b2f5e..5875ec65a807 100644
--- a/dev-python/ipdb/ipdb-0.13.9-r2.ebuild
+++ b/dev-python/ipdb/ipdb-0.13.9-r3.ebuild
@@ -5,23 +5,37 @@ EAPI=8
PYTHON_COMPAT=( python3_{7,8,9,10} )
DISTUTILS_USE_PEP517=setuptools
+
inherit distutils-r1 optfeature
DESCRIPTION="IPython-enabled pdb"
-HOMEPAGE="https://pypi.org/project/ipdb/ https://github.com/gotcha/ipdb"
+HOMEPAGE="
+ https://github.com/gotcha/ipdb/
+ https://pypi.org/project/ipdb/
+"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 ~riscv ~sparc x86"
-RDEPEND=">=dev-python/ipython-7.17[${PYTHON_USEDEP}]"
-BDEPEND="test? ( dev-python/toml[${PYTHON_USEDEP}] )"
+RDEPEND="
+ >=dev-python/ipython-7.17[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/tomli[${PYTHON_USEDEP}]
+ )
+"
DOCS=( AUTHORS HISTORY.txt README.rst )
+PATCHES=(
+ "${FILESDIR}"/${P}-tomli.patch
+)
+
distutils_enable_tests unittest
pkg_postinst() {
- optfeature "pyproject.toml support" dev-python/toml
+ optfeature "pyproject.toml support" dev-python/tomli
}