summaryrefslogtreecommitdiff
path: root/dev-python/requests-mock
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/requests-mock
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/requests-mock')
-rw-r--r--dev-python/requests-mock/Manifest1
-rw-r--r--dev-python/requests-mock/files/requests-mock-1.12.0-no-pbr.patch22
-rw-r--r--dev-python/requests-mock/metadata.xml13
-rw-r--r--dev-python/requests-mock/requests-mock-1.12.1.ebuild53
4 files changed, 89 insertions, 0 deletions
diff --git a/dev-python/requests-mock/Manifest b/dev-python/requests-mock/Manifest
new file mode 100644
index 000000000000..d03e0f6492db
--- /dev/null
+++ b/dev-python/requests-mock/Manifest
@@ -0,0 +1 @@
+DIST requests-mock-1.12.1.tar.gz 60901 BLAKE2B 708b19731260b8a1c1334b564c35825a9bceb20b8205ed3ad0f9c778e2c22e3ae4a93fa09cd47e9c745f5a282ebaf83a43be09ee4bd578195b77f69b116e28c6 SHA512 be1f4afa800811025e3c7b14a65759851ef2d56a3e4bf155368dc6772440fe0fcc5d01f62b1b029d0cabd7a57fe35074e3ba0791240f95f43b62109a00f96120
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/metadata.xml b/dev-python/requests-mock/metadata.xml
new file mode 100644
index 000000000000..0b6a05367399
--- /dev/null
+++ b/dev-python/requests-mock/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches />
+ <upstream>
+ <bugs-to>https://github.com/jamielennox/requests-mock/issues</bugs-to>
+ </upstream>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/requests-mock/requests-mock-1.12.1.ebuild b/dev-python/requests-mock/requests-mock-1.12.1.ebuild
new file mode 100644
index 000000000000..3b78e2d00837
--- /dev/null
+++ b/dev-python/requests-mock/requests-mock-1.12.1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Mock out responses from the requests package"
+HOMEPAGE="
+ https://github.com/jamielennox/requests-mock/
+ https://pypi.org/project/requests-mock/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv x86"
+
+RDEPEND="
+ >=dev-python/requests-2.22[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/requests-futures[${PYTHON_USEDEP}]
+ dev-python/testtools[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_sphinx doc/source
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ local PATCHES=(
+ # https://github.com/jamielennox/requests-mock/pull/255
+ "${FILESDIR}/${PN}-1.12.0-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
+ rm doc/source/release-notes.rst || die
+ sed -i '/^=============$/,/release-notes/d' doc/source/index.rst || die
+ # Disable a test which requires purl (not in the tree)
+ sed -e "/^import purl$/d" -e "s/test_with_purl/_&/" \
+ -i tests/test_adapter.py || die
+ distutils-r1_python_prepare_all
+}