public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-blessed] epel10: Modernize spec for EPEL 10 based on rawhide
@ 2026-09-23 13:22
0 siblings, 0 replies; only message in thread
From: @ 2026-09-23 13:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-blessed
Branch : epel10
Commit : 172a60c5d8a1f80d9898c69692acb749048aff4e
Author : Ondřej Gajdušek <ogajduse@redhat.com>
Date : 2026-06-23T13:00:12+02:00
Stats : +15/-327 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-blessed/c/172a60c5d8a1f80d9898c69692acb749048aff4e?branch=epel10
Log:
Modernize spec for EPEL 10 based on rawhide
- Start from rawhide spec structure (per maintainer request)
- Use %pyproject_wheel/%pyproject_install instead of %py3_build/%py3_install
- Use %autorelease and %autochangelog
- Remove all Python 2, EL7, and python3_other conditionals
- Remove el7_req_fixes.patch and el7_pytest_fixes.patch (no longer needed)
- Keep version at 1.20.0 (last setuptools-based, compatible with
RHEL 10 BaseOS wcwidth 0.2.6)
- Use %pyproject_save_files -L (setuptools has no PEP 639 license metadata)
- Validated: Copr build 10632816 succeeded
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
diff --git a/el7_pytest_fixes.patch b/el7_pytest_fixes.patch
deleted file mode 100644
index 861be03..0000000
--- a/el7_pytest_fixes.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/tests/test_core.py b/tests/test_core.py
-index dd69a96..c666a3a 100644
---- a/tests/test_core.py
-+++ b/tests/test_core.py
-@@ -389,13 +389,23 @@ def test_unknown_preferredencoding_warned_and_fallback():
- """Ensure a locale without a codec emits a warning."""
- @as_subprocess
- def child():
-+ warnings.filterwarnings("error", category=UserWarning)
-+ match = ('LookupError: unknown encoding: ---unknown--encoding---, '
-+ 'defaulting to UTF-8 for keyboard.')
- with mock.patch('locale.getpreferredencoding') as get_enc:
- get_enc.return_value = '---unknown--encoding---'
-- with pytest.warns(UserWarning, match=(
-- 'LookupError: unknown encoding: ---unknown--encoding---, '
-- 'defaulting to UTF-8 for keyboard.')):
-- t = TestTerminal()
-- assert t._encoding == 'UTF-8'
-+ try:
-+ TestTerminal()
-+ except UserWarning as e:
-+ assert match in str(e)
-+ else:
-+ raise AssertionError('Did not raise warning')
-+
-+ warnings.filterwarnings("ignore", category=UserWarning)
-+ t = TestTerminal()
-+ assert t._encoding == 'UTF-8'
-+
-+ warnings.resetwarnings()
-
- child()
diff --git a/el7_req_fixes.patch b/el7_req_fixes.patch
deleted file mode 100644
index 7348090..0000000
--- a/el7_req_fixes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/requirements.txt b/requirements.txt
-index 917d2a4..229c298 100644
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -1,8 +1,8 @@
- wcwidth>=0.1.4
- six>=1.9.0
- # support python2.6 by using backport of 'orderedict'
--ordereddict==1.1; python_version < "2.7"
-+# ordereddict==1.1; python_version < "2.7"
- # support python2.7 by using backport of 'functools.lru_cache'
--backports.functools-lru-cache>=1.2.1; python_version < "3.2"
-+# backports.functools-lru-cache>=1.2.1; python_version < "3.2"
- # Windows requires jinxed
--jinxed>=0.5.4; platform_system == "Windows"
-\ No newline at end of file
-+# jinxed>=0.5.4; platform_system == "Windows"
-\ No newline at end of file
\ No newline at end of file
diff --git a/python-blessed.spec b/python-blessed.spec
index 3afa346..cf6d1d6 100644
--- a/python-blessed.spec
+++ b/python-blessed.spec
@@ -22,103 +22,30 @@ It provides: \
- Act intelligently when somebody redirects your output to a file, omitting \
all of the terminal sequences such as styling, colors, or positioning. \
- Dead-simple keyboard handling: safely decoding unicode input in your \
- system’s preferred locale and supports application/arrow keys. \
+ system's preferred locale and supports application/arrow keys. \
- Allows the printable length of strings containing sequences to be \
determined.
-%bcond_without python3
-
-# Disable dependency generator until it has test code
-%{?python_disable_dependency_generator}
-
-# Drop Python 2 with Fedora 30 and EL8
-%if (0%{?fedora} && 0%{?fedora} < 30) || (0%{?rhel} && 0%{?rhel} < 8)
- %bcond_without python2
-%else
- %bcond_with python2
-%endif
-
Name: python-%{pypi_name}
Version: 1.20.0
-Release: 1%{?dist}
+Release: %autorelease
Summary: %{summary}
License: MIT
URL: https://github.com/jquast/blessed
Source0: %{pypi_source}
-BuildArch: noarch
-
-%if 0%{?el7}
-Patch0: el7_req_fixes.patch
-Patch1: el7_pytest_fixes.patch
-%endif
-
-%if %{with python2}
-BuildRequires: python2-devel
-BuildRequires: python2-setuptools
-BuildRequires: python2-six
-BuildRequires: python2-wcwidth
-BuildRequires: python2-mock
-BuildRequires: python2-pytest
-BuildRequires: python2-backports-functools_lru_cache
-%endif
+BuildArch: noarch
-%if %{with python3}
BuildRequires: python%{python3_pkgversion}-devel
-BuildRequires: python%{python3_pkgversion}-setuptools
-BuildRequires: python%{python3_pkgversion}-six
-BuildRequires: python%{python3_pkgversion}-wcwidth
BuildRequires: python%{python3_pkgversion}-pytest
-%endif
-
-%if 0%{?with_python3_other}
-BuildRequires: python%{python3_other_pkgversion}-devel
-BuildRequires: python%{python3_other_pkgversion}-setuptools
-BuildRequires: python%{python3_other_pkgversion}-six
-BuildRequires: python%{python3_other_pkgversion}-wcwidth
-BuildRequires: python%{python3_other_pkgversion}-pytest
-%endif
%description %{_description}
-# Python 2 package
-%if %{with python2}
-%package -n python2-%{pypi_name}
-Summary: %{summary}
-%{?python_provide:%python_provide python2-%{pypi_name}}
-
-Requires: python2-six
-Requires: python2-wcwidth
-Requires: python2-backports-functools_lru_cache
-
-
-%description -n python2-%{pypi_name} %{_description}
-%endif
-
-# Python 3 package
-%if %{with python3}
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary}
-%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
-
-Requires: python%{python3_pkgversion}-six
-Requires: python%{python3_pkgversion}-wcwidth
%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}
-%endif
-
-# Python 3 other package
-%if 0%{?with_python3_other}
-%package -n python%{python3_other_pkgversion}-%{pypi_name}
-Summary: %{summary}
-%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}}
-
-Requires: python%{python3_other_pkgversion}-six
-Requires: python%{python3_other_pkgversion}-wcwidth
-
-%description -n python%{python3_other_pkgversion}-%{pypi_name} %{_description}
-%endif
%prep
@@ -127,217 +54,28 @@ Requires: python%{python3_other_pkgversion}-wcwidth
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
+%generate_buildrequires
+%pyproject_buildrequires
-%build
-%if %{with python2}
-%py2_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-%if 0%{?with_python3_other}
-%py3_other_build
-%endif
+%build
+%pyproject_wheel
%install
-%if 0%{?with_python3_other}
-%py3_other_install
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%if %{with python2}
-%py2_install
-%endif
+%pyproject_install
+%pyproject_save_files -L %{pypi_name}
+mkdir -p %{buildroot}%{_docdir}/%{name}/
+(cd docs && find -name "*.rst" -exec cp --parents {} %{buildroot}%{_docdir}/%{name}/ \;)
%check
-export PYTHONIOENCODING=UTF8
-export TERM=xterm-256color
-%if %{with python2}
-# Skip test that uses pytest.warn, since it's not supported in older versions
-%{__python2} -m pytest --strict --verbose --verbose --exitfirst -c /dev/null \
--k 'not test_unknown_preferredencoding_warned_and_fallback_ascii'
-%endif
-
-%if %{with python3}
-%{__python3} -m pytest --strict --verbose --verbose --exitfirst -c /dev/null
-%endif
+PYTHONIOENCODING=UTF8 TERM=xterm-256color %pytest --verbose --verbose --exitfirst -c /dev/null
-%if 0%{?with_python3_other}
-%{__python3_other} -m pytest --strict --verbose --verbose --exitfirst -c /dev/null
-%endif
-
-%if %{with python2}
-%files -n python2-%{pypi_name}
+%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
%license LICENSE
-%doc README.rst docs/*.rst
-%{python2_sitelib}/%{pypi_name}
-%{python2_sitelib}/%{pypi_name}-*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python%{python3_pkgversion}-%{pypi_name}
-%license LICENSE
-%doc README.rst docs/*.rst
-%{python3_sitelib}/%{pypi_name}
-%{python3_sitelib}/%{pypi_name}-*.egg-info
-%endif
-
-%if 0%{?with_python3_other}
-%files -n python%{python3_other_pkgversion}-%{pypi_name}
-%license LICENSE
-%doc README.rst docs/*.rst
-%{python3_other_sitelib}/%{pypi_name}
-%{python3_other_sitelib}/%{pypi_name}-*.egg-info
-%endif
-
+%doc %{_docdir}/%{name}
%changelog
-* Tue Jun 16 2026 Ondřej Gajdušek <ogajduse@redhat.com> - 1.20.0-1
-- Rebuild for EPEL 10 (rhbz#2348444)
-
-* Sat Apr 20 2024 Avram Lubkin <aviso@rockhopper.net> - 1.20.0-1
-- Update to 1.20.0 (#2167042)
-- Remove EL6 patches
-
-* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-8
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-7
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
-
-* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
-
-* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.19.1-5
-- Rebuilt for Python 3.12
-
-* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
-
-* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
-
-* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.19.1-2
-- Rebuilt for Python 3.11
-
-* Wed Mar 30 2022 Avram Lubkin <aviso@rockhopper.net> - 1.19.1-1
-- Update to 1.19.1 (#2043269)
-
-* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
-
-* Tue Sep 21 2021 Avram Lubkin <aviso@rockhopper.net> - 1.19.0-1
-- Update to 1.19.0 (#2006163)
-
-* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.1-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
-
-* Tue Jun 15 2021 Fedora Release Monitoring <aviso@rockhopper.net> - 1.18.1-1
-- Update to 1.18.1 (#1932716)
-
-* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.17.12-3
-- Rebuilt for Python 3.10
-
-* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.12-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
-
-* Sun Jan 17 2021 Avram Lubkin <aviso@rockhopper.net> - 1.17.12-1
-- Updated to 1.17.12
-
-* Mon Sep 14 2020 Avram Lubkin <aviso@rockhopper.net> - 1.17.10-1
-- Updated to 1.17.10
-
-* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.8-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Fri Jun 19 2020 Avram Lubkin <aviso@rockhopper.net> - 1.17.8-2
-- Add EL7 pytest patch
-
-* Fri Jun 19 2020 Avram Lubkin <aviso@rockhopper.net> - 1.17.8-1
-- Updated to 1.17.8
-
-* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.17.4-3
-- Rebuilt for Python 3.9
-
-* Sat Mar 28 2020 Avram Lubkin <aviso@rockhopper.net> - 1.17.4-2
-- Updated requirements file for EL7
-
-* Sat Mar 28 2020 Avram Lubkin <aviso@rockhopper.net> - 1.17.4-1
-- Updated to 1.17.4
-
-* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.1-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
-
-* Tue Oct 29 2019 Avram Lubkin <aviso@rockhopper.net> - 1.16.1-2
-- Fix epel6 requirements patch
-
-* Sun Oct 27 2019 Avram Lubkin <aviso@rockhopper.net> - 1.16.1-1
-- Updated to 1.16.1
-
-* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.15.0-12
-- Rebuilt for Python 3.8.0rc1 (#1748018)
-
-* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.15.0-11
-- Rebuilt for Python 3.8
-
-* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-10
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
-
-* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-9
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
-
-* Mon Dec 24 2018 Avram Lubkin <aviso@rockhopper.net> - 1.15.0-8
-- Disable Python dependency generator until it has test code
-
-* Mon Dec 24 2018 Avram Lubkin <aviso@rockhopper.net> - 1.15.0-7
-- Remove Python 2 packages in Fedora 30+ (bz#1661354)
-- Clean up spec
-
-* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.15.0-6
-- Drop explicit locale setting
- See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
-
-* Tue Nov 13 2018 Avram Lubkin <aviso@rockhopper.net> - 1.15.0-5
-- Build Python 3 version on all platforms
-
-* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
-
-* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1.15.0-3
-- Rebuilt for Python 3.7
-
-* Wed Jun 20 2018 Avram Lubkin <aviso@rockhopper.net> - 1.15.0-2
-- Fixed spec changelog error
-
-* Wed Jun 20 2018 Avram Lubkin <aviso@rockhopper.net>- 1.15.0-1
-- Updated to 1.15.0 (Python 3.7 Support)
-- Exit tests on first failure to avoid loops
-
-* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.14.1-7
-- Rebuilt for Python 3.7
-
-* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.1-6
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
-
-* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.14.1-5
-- Fix creation of python2- subpackage
-
-* Wed Oct 04 2017 Avram Lubkin <aviso@rockhopper.net> - 1.14.1-4
-- Conflicting ordereddict requirements in EL6
-
-* Wed Oct 04 2017 Avram Lubkin <aviso@rockhopper.net> - 1.14.1-3
-- Add EL6 build support
-
-* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.1-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
-
-* Mon Mar 13 2017 Aurelien Bompard <abompard@fedoraproject.org> - 1.14.1
-- Initial package.
+%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-23 13:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 13:22 [rpms/python-blessed] epel10: Modernize spec for EPEL 10 based on rawhide
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox