diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-10-20 22:02:03 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-10-20 22:13:39 +0200 |
commit | f8c4b4f7d10385ae1d64c01cc854e758f1eda92d (patch) | |
tree | 84309421a61e7b301aad757fd38884f4b0020dce /dev-python/debugpy | |
parent | dev-python/s3transfer: Remove old (diff) | |
download | gentoo-f8c4b4f7d10385ae1d64c01cc854e758f1eda92d.tar.gz gentoo-f8c4b4f7d10385ae1d64c01cc854e758f1eda92d.tar.bz2 gentoo-f8c4b4f7d10385ae1d64c01cc854e758f1eda92d.zip |
dev-python/debugpy: Bump to 1.8.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/debugpy')
-rw-r--r-- | dev-python/debugpy/Manifest | 1 | ||||
-rw-r--r-- | dev-python/debugpy/debugpy-1.8.0.ebuild | 66 | ||||
-rw-r--r-- | dev-python/debugpy/files/debugpy-1.8.0-unbundle-pydevd.patch | 46 |
3 files changed, 113 insertions, 0 deletions
diff --git a/dev-python/debugpy/Manifest b/dev-python/debugpy/Manifest index b5ce88b5c535..c4d06f27e148 100644 --- a/dev-python/debugpy/Manifest +++ b/dev-python/debugpy/Manifest @@ -1 +1,2 @@ DIST debugpy-1.6.6.gh.tar.gz 6942488 BLAKE2B 18c6eee2322239e5cbbacf9431fa7480abcf14a68f290d2228edc8b2ead042e7b09d19ee5bcc60be32e8a6b0b34b925eaa8246991298744f3ca74d4ed2ea3f3e SHA512 1a209bfd702d5f0649ce50b0910023e295953dd39cefdefb0b5af1d6023e629a727610789cd244e656bdf4276cee957fa463506ddaca603ab3ee85cc250dc212 +DIST debugpy-1.8.0.gh.tar.gz 6760323 BLAKE2B 99c4188c0b0383dc4dcbdd86c4d35e6eb973ca32ba56b757adea9668b161f20f17b436e0dc019790b1e85586387fc848712143c5e3d3814e2522850d97a4048e SHA512 f9e47371ca854c12811d1c0984f063b1ad5cac2bea769f91a67f9fa125cfcbeccbecafca9b9d5ea16a4ed8a1c123f34db3ba19efe1567b93a86cbd325239b355 diff --git a/dev-python/debugpy/debugpy-1.8.0.ebuild b/dev-python/debugpy/debugpy-1.8.0.ebuild new file mode 100644 index 000000000000..bf665f0da2e0 --- /dev/null +++ b/dev-python/debugpy/debugpy-1.8.0.ebuild @@ -0,0 +1,66 @@ +# 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..11} ) + +inherit distutils-r1 multiprocessing + +DESCRIPTION="An implementation of the Debug Adapter Protocol for Python" +HOMEPAGE=" + https://github.com/microsoft/debugpy/ + https://pypi.org/project/debugpy/ +" +SRC_URI=" + https://github.com/microsoft/${PN}/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + dev-python/pydevd[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/psutil[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/pytest-timeout[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +python_prepare_all() { + # Unbundle dev-python/pydevd + rm -r src/debugpy/_vendored/pydevd || die + local PATCHES=( + "${FILESDIR}/${PN}-1.8.0-unbundle-pydevd.patch" + ) + + # Drop unnecessary and unrecognized option + # __main__.py: error: unrecognized arguments: -n8 + # Do not timeout + sed -e '/addopts/d' -e '/timeout/d' -i pytest.ini || die + + distutils-r1_python_prepare_all +} + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local EPYTEST_DESELECT=( + tests/debugpy/test_gevent.py::test_gevent + tests/debugpy/test_run.py::test_custom_python_args + tests/tests/test_timeline.py::test_occurrences + ) + local EPYTEST_IGNORE=( + tests/tests/test_vendoring.py + ) + epytest -p timeout -p xdist -n "$(makeopts_jobs)" --dist=worksteal \ + -k "not attach_pid" +} diff --git a/dev-python/debugpy/files/debugpy-1.8.0-unbundle-pydevd.patch b/dev-python/debugpy/files/debugpy-1.8.0-unbundle-pydevd.patch new file mode 100644 index 000000000000..54ccdae4ca01 --- /dev/null +++ b/dev-python/debugpy/files/debugpy-1.8.0-unbundle-pydevd.patch @@ -0,0 +1,46 @@ +diff --git a/setup.py b/setup.py +index 0bb4f00..abfce1c 100644 +--- a/setup.py ++++ b/setup.py +@@ -18,12 +18,10 @@ del sys.path[0] + + sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "src")) + import debugpy +-import debugpy._vendored + + del sys.path[0] + + +-PYDEVD_ROOT = debugpy._vendored.project_root("pydevd") + DEBUGBY_ROOT = os.path.dirname(os.path.abspath(debugpy.__file__)) + + +@@ -146,8 +144,6 @@ if __name__ == "__main__": + extras["platforms"] = platforms + + cmds = versioneer.get_cmdclass() +- override_build(cmds) +- override_build_py(cmds) + + setuptools.setup( + name="debugpy", +diff --git a/src/debugpy/_vendored/force_pydevd.py b/src/debugpy/_vendored/force_pydevd.py +index cfd8927..0cb1bca 100644 +--- a/src/debugpy/_vendored/force_pydevd.py ++++ b/src/debugpy/_vendored/force_pydevd.py +@@ -8,15 +8,6 @@ import warnings + + from . import check_modules, prefix_matcher, preimport, vendored + +-# Ensure that pydevd is our vendored copy. +-_unvendored, _ = check_modules('pydevd', +- prefix_matcher('pydev', '_pydev')) +-if _unvendored: +- _unvendored = sorted(_unvendored.values()) +- msg = 'incompatible copy of pydevd already imported' +- # raise ImportError(msg) +- warnings.warn(msg + ':\n {}'.format('\n '.join(_unvendored))) +- + # If debugpy logging is enabled, enable it for pydevd as well + if "DEBUGPY_LOG_DIR" in os.environ: + os.environ[str("PYDEVD_DEBUG")] = str("True") |