public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-kaptan] rawhide: Fixes F45FTBS plus spec cleanup and modernization
Date: Thu, 06 Aug 2026 01:41:57 GMT	[thread overview]
Message-ID: <178598051706.1.171951752831435901.rpms-python-kaptan-2dc9d0154c97@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-kaptan
            Branch : rawhide
            Commit : 2dc9d0154c97e2616790568963b4040218eeda77
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-07-27T21:34:26-03:00
            Stats  : +29/-11 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-kaptan/c/2dc9d0154c97e2616790568963b4040218eeda77?branch=rawhide

            Log:
            Fixes F45FTBS plus spec cleanup and modernization

Resolves: rhbz#2423881
Resolves: rhbz#2377835

---
diff --git a/python-kaptan-importlib.patch b/python-kaptan-importlib.patch
new file mode 100644
index 0000000..2498ba5
--- /dev/null
+++ b/python-kaptan-importlib.patch
@@ -0,0 +1,17 @@
+--- kaptan-0.6.0/kaptan/handlers/pyfile_handler.py.orig	2026-07-27 21:28:00.000000000 -0300
++++ kaptan-0.6.0/kaptan/handlers/pyfile_handler.py	2026-07-27 21:28:00.000000000 -0300
+@@ -40,9 +40,11 @@
+         raise IOError('File {0} not found.'.format(pathname))
+ 
+     if sys.version_info[0] == 3 and sys.version_info[1] > 2:  # Python >= 3.3
+-        import importlib.machinery
+-        loader = importlib.machinery.SourceFileLoader('', pathname)
+-        mod = loader.load_module(mod_name)
++        import importlib.util
++        spec = importlib.util.spec_from_file_location(mod_name, pathname)
++        mod = importlib.util.module_from_spec(spec)
++        sys.modules[mod_name] = mod
++        spec.loader.exec_module(mod)
+     else:  # 2.6 >= Python <= 3.2
+         import imp
+         mod = imp.load_source(mod_name, pathname)

diff --git a/python-kaptan.spec b/python-kaptan.spec
index 50e3f48..d68de90 100644
--- a/python-kaptan.spec
+++ b/python-kaptan.spec
@@ -6,9 +6,10 @@ Release:        9%{?dist}
 Summary:        Configuration parser
 
 # Automatically converted from old format: BSD - review is highly recommended.
-License:        LicenseRef-Callaway-BSD
+License:        BSD-3-Clause
 URL:            https://github.com/emre/kaptan
 Source:         %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
+Patch0:         python-kaptan-importlib.patch
 BuildArch:      noarch
 
 %description
@@ -18,34 +19,34 @@ BuildArch:      noarch
 Summary:        %{summary}
 
 BuildRequires:  python3-devel
+BuildRequires:  python3-pytest
 BuildRequires:  python3-setuptools
-BuildRequires:  python3dist(pyyaml)
-BuildRequires:  python3dist(pytest)
-%{?python_provide:%python_provide python3-%{srcname}}
+BuildRequires:  python3-yaml
 
 %description -n python3-%{srcname}
 %{summary}.
 
 %prep
-%autosetup -n %{srcname}-%{version}
+%autosetup -n %{srcname}-%{version} -p1
 sed -i -e 's/PyYAML>=3.13,<6/PyYAML/' requirements/base.txt
 
+%generate_buildrequires
+%pyproject_buildrequires
+
 %build
-%py3_build
+%pyproject_wheel
 
 %install
-%py3_install
+%pyproject_install
+%pyproject_save_files %{srcname}
 
 %check
 %pytest -v tests
 
 # A man page has been requested upstream here:
 # https://github.com/emre/kaptan/issues/44
-%files -n python3-%{srcname}
-%license LICENSE
+%files -n python3-%{srcname} -f %{pyproject_files}
 %doc README.rst
-%{python3_sitelib}/%{srcname}-*.egg-info/
-%{python3_sitelib}/%{srcname}/
 %{_bindir}/%{srcname}
 
 %changelog

                 reply	other threads:[~2026-08-06  1:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178598051706.1.171951752831435901.rpms-python-kaptan-2dc9d0154c97@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox