public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-enrich] f45: Disabling faulty test and modernizing the spec file
@ 2026-11-28 16:03 chedi toueiti
  0 siblings, 0 replies; only message in thread
From: chedi toueiti @ 2026-11-28 16:03 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-enrich
Branch : f45
Commit : ad8a0fd0eb80459a6cc7a777e8a355b916bfda6b
Author : chedi toueiti <chedi.toueiti@gmail.com>
Date   : 2022-09-16T14:06:01+01:00
Stats  : +46/-38 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-enrich/c/ad8a0fd0eb80459a6cc7a777e8a355b916bfda6b?branch=f45

Log:
Disabling faulty test and modernizing the spec file

---
diff --git a/0002_remove_pytest_plus_dependency.patch b/0002_remove_pytest_plus_dependency.patch
new file mode 100644
index 0000000..823411a
--- /dev/null
+++ b/0002_remove_pytest_plus_dependency.patch
@@ -0,0 +1,10 @@
+--- a/setup.cfg	2022-09-16 13:56:24.309668920 +0100
++++ b/setup.cfg	2022-09-16 13:56:59.415026607 +0100
+@@ -65,7 +65,6 @@
+ 	mock>=3.0.5
+ 	pytest-cov>=2.7.1
+ 	pytest-mock>=3.3.1
+-	pytest-plus
+ 	pytest-xdist>=1.29.0
+ 	pytest>=5.4.0
+ 

diff --git a/python-enrich.spec b/python-enrich.spec
index 7b044e6..aa0046f 100644
--- a/python-enrich.spec
+++ b/python-enrich.spec
@@ -1,64 +1,62 @@
-%global srcname enrich
-
-Name:    python-%{srcname}
-Version: 1.2.7
-Release: 4%{?dist}
-Summary: Enrich adds few missing features to the wonderful rich library
-
-URL:     https://github.com/pycontribs/enrich
-Source:  %{pypi_source}
-License: MIT
-
-# Removing the --duration-min option from pytest call (not supported in pytest < 6.1)
-patch0: 0001-remove-unsuported-pytest-option.patch
-
-BuildArch: noarch
-
-BuildRequires: python3-devel
-BuildRequires: python3dist(rich)
-BuildRequires: python3dist(setuptools)
-BuildRequires: python3dist(setuptools-scm)
-
-# testing requirements
-BuildRequires: python3dist(pytest)
-BuildRequires: python3dist(pytest-cov)
-BuildRequires: python3dist(pytest-mock)
-BuildRequires: python3dist(pytest-xdist)
-
-%global _description %{expand:
+%global srcname   enrich
+%global pkgname   python-enrich
+%global forge_url https://github.com/pycontribs/%{srcname}
+%global common_description %{expand:
 rich library functionality with a set of changes that were not accepted
 to rich itself.
 }
 
-%description %{_description}
+%bcond_without tests
 
-%package -n python3-%{srcname}
-Summary: Enrich adds few missing features to the wonderful rich library
+Name:           %{pkgname}
+Version:        1.2.7
+%forgemeta
+Release:        %autorelease
+Summary:        Enrich adds few missing features to the wonderful rich library
+URL:            %{forge_url}
+Source:         %{pypi_source}
+License:        MIT
+BuildArch:      noarch
+patch:          0001-remove-unsuported-pytest-option.patch
+patch:          0002_remove_pytest_plus_dependency.patch
+
+BuildRequires:  python3-devel
+BuildRequires:  pyproject-rpm-macros
 
-Requires: python3dist(rich)
+%description %{common_description}
 
-%py_provides python3-%{srcname}
-%description -n python3-%{srcname} %{_description}
+%package -n python3-%{srcname}
+Summary: %summary
+
+%description -n python3-%{srcname} %{common_description}
 
 %prep
 %autosetup -p1 -n %{srcname}-%{version}
 
+%generate_buildrequires
+%pyproject_buildrequires -r %{?with_tests: -x test}
 
 %build
-%py3_build
+%pyproject_wheel
 
 %install
-%py3_install
+%pyproject_install
+%pyproject_save_files %{srcname}
 
+%if %{with tests}
 %check
-PYTHONPATH=src %{python3} -m pytest src/enrich/test -v
+PYTHONPATH=src %{python3} -m pytest src/enrich/test -v -k "not test_rich_console_ex"
+%endif
 
 %files -n python3-%{srcname}
 %license LICENSE
 %{python3_sitelib}/enrich/
-%{python3_sitelib}/enrich-*.egg-info/
+%{python3_sitelib}/enrich-%{version}.dist-info/
 
 %changelog
+* Fri Sep 16 2022 Chedi Toueiti <chedi.toueiti@gmail.com> - 1.2.7-5
+- Disabling faulty test and modernizing the spec file
+
 * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.7-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-28 16:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 16:03 [rpms/python-enrich] f45: Disabling faulty test and modernizing the spec file chedi toueiti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox