diff options
author | 2024-03-28 13:25:54 +0100 | |
---|---|---|
committer | 2024-03-28 13:26:52 +0100 | |
commit | 95b7c715b18099de0d637d082b841b8eea4866b4 (patch) | |
tree | d5cb23ba19a8e8080dc09e3284921a6d106216e9 /dev-python | |
parent | dev-python/tavern: Fix test failures with pytest-8 (diff) | |
download | gentoo-95b7c715b18099de0d637d082b841b8eea4866b4.tar.gz gentoo-95b7c715b18099de0d637d082b841b8eea4866b4.tar.bz2 gentoo-95b7c715b18099de0d637d082b841b8eea4866b4.zip |
dev-python/requests-mock: Remove last use of pbr
Closes: https://bugs.gentoo.org/928008
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/requests-mock/files/requests-mock-1.12.0-no-pbr.patch | 22 | ||||
-rw-r--r-- | dev-python/requests-mock/requests-mock-1.12.0.ebuild | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev-python/requests-mock/files/requests-mock-1.12.0-no-pbr.patch b/dev-python/requests-mock/files/requests-mock-1.12.0-no-pbr.patch new file mode 100644 index 000000000000..fcfc8f9d2eb4 --- /dev/null +++ b/dev-python/requests-mock/files/requests-mock-1.12.0-no-pbr.patch @@ -0,0 +1,22 @@ +From 82a6d09fa8db7a0667b365e9c06e99f8c0dfd245 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Thu, 28 Mar 2024 12:54:18 +0100 +Subject: [PATCH] Replace the last use of pbr with modern packaging + +diff --git a/doc/source/conf.py b/doc/source/conf.py +index 395acaa..e0895f5 100755 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -16 +16,2 @@ import sys, os +-import pbr.version ++import importlib.metadata ++import packaging +@@ -56 +57 @@ copyright = u'2023, Jamie Lennox' +-version_info = pbr.version.VersionInfo(project) ++version_info = packaging.version.parse(importlib.metadata.version(project)) +@@ -59 +60 @@ version_info = pbr.version.VersionInfo(project) +-version = version_info.version_string() ++version = version_info.base_version +@@ -61 +62 @@ version = version_info.version_string() +-release = version_info.release_string() ++release = version_info.public diff --git a/dev-python/requests-mock/requests-mock-1.12.0.ebuild b/dev-python/requests-mock/requests-mock-1.12.0.ebuild index a0e17f881c2f..ff7866ac1da6 100644 --- a/dev-python/requests-mock/requests-mock-1.12.0.ebuild +++ b/dev-python/requests-mock/requests-mock-1.12.0.ebuild @@ -36,6 +36,11 @@ distutils_enable_sphinx doc/source distutils_enable_tests pytest python_prepare_all() { + local PATCHES=( + # https://github.com/jamielennox/requests-mock/pull/255 + "${FILESDIR}/${P}-no-pbr.patch" + ) + # Disable reno which only works inside a git repository sed -i "s/'reno.sphinxext',//" doc/source/conf.py || die # Remove the release notes section which requires reno |