diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-03-02 09:31:58 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-03-02 09:31:58 +0100 |
commit | 828c737b37c0d6a026a4ecde277e3ad12ccb75b1 (patch) | |
tree | f2b01ead03b73245acb66ae82ed50e404ee772f2 /dev-python/jaraco-context | |
parent | dev-python/pyelftools: Remove old (diff) | |
download | gentoo-828c737b37c0d6a026a4ecde277e3ad12ccb75b1.tar.gz gentoo-828c737b37c0d6a026a4ecde277e3ad12ccb75b1.tar.bz2 gentoo-828c737b37c0d6a026a4ecde277e3ad12ccb75b1.zip |
dev-python/jaraco-context: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/jaraco-context')
-rw-r--r-- | dev-python/jaraco-context/Manifest | 1 | ||||
-rw-r--r-- | dev-python/jaraco-context/files/jaraco-context-3.0.0-useless-deps.patch | 62 | ||||
-rw-r--r-- | dev-python/jaraco-context/jaraco-context-3.0.0-r1.ebuild | 41 |
3 files changed, 0 insertions, 104 deletions
diff --git a/dev-python/jaraco-context/Manifest b/dev-python/jaraco-context/Manifest index 3e3330b30174..a1dc974d4ca1 100644 --- a/dev-python/jaraco-context/Manifest +++ b/dev-python/jaraco-context/Manifest @@ -1,2 +1 @@ -DIST jaraco.context-3.0.0.tar.gz 12901 BLAKE2B b0a18d8799de211c9827a708302798372dff06767fbac08f4bff8ed48e1dde4cca8d3896a3c4dccd186efdc4d80ffe2b972a05e8f351ec53dcd0c7dec45cfcea SHA512 fd48a9af65edea3212c194758ba1a8fc2d7efc35f7eaec959a7f327ad46d1bf15f295af29d62726f813d35baaeaff35bc3fcd6e27a0e0f272232772e1cb87c17 DIST jaraco.context-4.0.0.tar.gz 11257 BLAKE2B 38faeb6036ebd2fc6cea9f29dc7fbd89b0ea60819e280e36c8c4f0f90e9ba2552524bfc0f3fc16601cd43276d19e166d9de4107ced885f88dea11efbe0a79913 SHA512 ec76e03d3d5a2148dd49159b303ee278501b9744d3e4d096d6aca516658fb04da020d1cbb1c8eb3dcb58097266e0419883d23e4064c295ced3846540177e57ee diff --git a/dev-python/jaraco-context/files/jaraco-context-3.0.0-useless-deps.patch b/dev-python/jaraco-context/files/jaraco-context-3.0.0-useless-deps.patch deleted file mode 100644 index 3b69581ab2b5..000000000000 --- a/dev-python/jaraco-context/files/jaraco-context-3.0.0-useless-deps.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e3a1f344c296f9d6193f4bf2ac1e0cdafcddce0e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Mon, 20 Jul 2020 18:11:31 +0200 -Subject: [PATCH] Make jaraco.apt & yg.lockfile imports optional - -Handle missing jaraco.apt & yg.lockfile modules more gracefully, -delaying the error until dependency_context is actually used. These -two modules are only used by the dependency_context, and this context -can only work on apt-based systems, so there is no point in forcing -the extraneous dependencies on systems that do not use apt where -jaraco.context is being installed for other context managers. ---- - jaraco/context.py | 19 ++++++++++++++++--- - 1 file changed, 16 insertions(+), 3 deletions(-) - -diff --git a/jaraco/context.py b/jaraco/context.py -index 0b5b1bc..13dfdf6 100644 ---- a/jaraco/context.py -+++ b/jaraco/context.py -@@ -13,8 +13,15 @@ try: - except Exception: - import contextlib as contextlib2 - --import jaraco.apt --import yg.lockfile -+try: -+ import jaraco.apt as apt -+except ImportError: -+ apt = None -+ -+try: -+ import yg.lockfile -+except ImportError: -+ yg = None - - - __metaclass__ = type -@@ -131,6 +138,12 @@ def dependency_context(package_names, aggressively_remove=False): - """ - installed_packages = [] - log = logging.getLogger(__name__) -+ if apt is None: -+ log.error("jaraco.apt not found installed") -+ raise ImportError("jaraco.apt not found installed") -+ if yg is None: -+ log.error("yg.lockfile not found installed") -+ raise ImportError("yg.lockfile not found installed") - try: - if not package_names: - logging.debug('No packages requested') -@@ -144,7 +157,7 @@ def dependency_context(package_names, aggressively_remove=False): - stderr=subprocess.STDOUT, - ) - log.debug('Aptitude output:\n%s', output) -- installed_packages = jaraco.apt.parse_new_packages( -+ installed_packages = apt.parse_new_packages( - output, include_automatic=aggressively_remove - ) - if not installed_packages: --- -2.27.0 - diff --git a/dev-python/jaraco-context/jaraco-context-3.0.0-r1.ebuild b/dev-python/jaraco-context/jaraco-context-3.0.0-r1.ebuild deleted file mode 100644 index f709277cbf50..000000000000 --- a/dev-python/jaraco-context/jaraco-context-3.0.0-r1.ebuild +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..9} pypy3 ) - -inherit distutils-r1 - -MY_PN="${PN/-/.}" -DESCRIPTION="Context managers by jaraco" -HOMEPAGE="https://github.com/jaraco/jaraco.context" -SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" -S="${WORKDIR}/${MY_PN}-${PV}" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~ia64 ppc ~ppc64 x86" - -BDEPEND=" - dev-python/setuptools_scm[${PYTHON_USEDEP}] -" - -distutils_enable_tests pytest - -PATCHES=( - "${FILESDIR}"/${P}-useless-deps.patch -) - -python_prepare_all() { - # used only for apt support that's irrelevant to Gentoo - sed -i -e '/jaraco\.apt/d' -e '/yg\.lockfile/d' setup.cfg || die - # pytest plugins - sed -i -e 's:--flake8 --black --cov::' pytest.ini || die - distutils-r1_python_prepare_all -} - -python_install() { - rm "${BUILD_DIR}"/lib/jaraco/__init__.py || die - distutils-r1_python_install -} |