public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-klein] epel10.3: Work around imp removal
@ 2026-10-06 1:14 Gwyn Ciesla
0 siblings, 0 replies; only message in thread
From: Gwyn Ciesla @ 2026-10-06 1:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-klein
Branch : epel10.3
Commit : d8fe93de1cf917f0ac2ad8c380bdcec427cd0678
Author : Gwyn Ciesla <gwync@protonmail.com>
Date : 2023-07-05T14:40:34-05:00
Stats : +29/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-klein/c/d8fe93de1cf917f0ac2ad8c380bdcec427cd0678?branch=epel10.3
Log:
Work around imp removal
---
diff --git a/imp-removal.patch b/imp-removal.patch
new file mode 100644
index 0000000..1a921e0
--- /dev/null
+++ b/imp-removal.patch
@@ -0,0 +1,27 @@
+--- docs/conf.py~ 2023-05-02 12:50:37.000000000 -0500
++++ docs/conf.py 2023-07-05 14:33:26.804404828 -0500
+@@ -1,12 +1,22 @@
+-import imp
++import importlib.util
++import importlib.machinery
+ import os
+ import sys
+
++def load_source(modname, filename):
++ loader = importlib.machinery.SourceFileLoader(modname, filename)
++ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
++ module = importlib.util.module_from_spec(spec)
++ # The module is always executed and not cached in sys.modules.
++ # Uncomment the following line to cache the module.
++ # sys.modules[module.__name__] = module
++ loader.exec_module(module)
++ return module
+
+ # Add the extensions folder...
+ sys.path.insert(0, os.path.abspath("./_extensions"))
+
+-_version = imp.load_source("setup", "../src/klein/_version.py")
++_version = load_source("setup", "../src/klein/_version.py")
+
+ extensions = []
+ templates_path = ["_templates"]
diff --git a/python-klein.spec b/python-klein.spec
index 7cf8810..00d1f7d 100644
--- a/python-klein.spec
+++ b/python-klein.spec
@@ -9,6 +9,7 @@ License: MIT
URL: https://github.com/twisted/klein
Source0: %{pypi_source}
BuildArch: noarch
+Patch0: imp-removal.patch
BuildRequires: python3-devel
BuildRequires: python3dist(attrs)
@@ -40,7 +41,7 @@ Summary: klein documentation
Documentation for klein
%prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -n %{pypi_name}-%{version} -p0
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-06 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 1:14 [rpms/python-klein] epel10.3: Work around imp removal Gwyn Ciesla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox