public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Steve Traylen <steve.traylen@cern.ch>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pyghmi] rawhide: Use tox to run unit tests in spec
Date: Tue, 09 Jun 2026 15:05:46 GMT	[thread overview]
Message-ID: <178101754694.1.9840987155841934029.rpms-python-pyghmi-382586105b27@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-pyghmi
            Branch : rawhide
            Commit : 382586105b277dea7ac2d2c3626d336879fe0e53
            Author : Steve Traylen <steve.traylen@cern.ch>
            Date   : 2026-06-09T16:47:52+02:00
            Stats  : +10/-4 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-pyghmi/c/382586105b277dea7ac2d2c3626d336879fe0e53?branch=rawhide

            Log:
            Use tox to run unit tests in spec

Switch to using the tox to run the tests which is how upstream
manages use of requirements files.

Also make description of -test package longer to suppress

```
python3-pyghmi-tests.noarch: W: description-shorter-than-summary
```

---
diff --git a/python-pyghmi.spec b/python-pyghmi.spec
index 07fb709..66a6340 100644
--- a/python-pyghmi.spec
+++ b/python-pyghmi.spec
@@ -10,7 +10,7 @@ incorporate the pyghmi library into a Python application.}
 Summary: Python General Hardware Management Initiative (IPMI and others)
 Name: python-%{sname}
 Version: 1.6.16
-Release: 3%{?dist}
+Release: 4%{?dist}
 Source0: https://tarballs.opendev.org/x/%{sname}/%{sname}-%{version}.tar.gz
 License: Apache-2.0
 BuildArch: noarch
@@ -35,6 +35,7 @@ Requires: python3-%{sname} = %{version}-%{release}
 
 
 %description -n python3-%{sname}-tests
+%_description
 
 Tests for the pyghmi library
 
@@ -52,15 +53,17 @@ Documentation for the pyghmi library
 
 sed -i '/^coverage[^a-zA-Z]/d' test-requirements.txt
 
+# Drop global openstack constraints
+sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
 
 %generate_buildrequires
-%pyproject_buildrequires doc/requirements.txt test-requirements.txt
+%pyproject_buildrequires -t -e docs,%{default_toxenv}
 
 
 %build
 %pyproject_wheel
 
-sphinx-build -b html doc/source doc/build/html
+%tox -e docs
 
 # remove the sphinx-build leftovers
 rm -rf doc/build/html/.{doctrees,buildinfo}
@@ -73,7 +76,7 @@ rm -rf doc/build/html/.{doctrees,buildinfo}
 
 
 %check
-%{py3_test_envvars} stestr run
+%tox -e %{default_toxenv}
 
 
 %files -n python3-%{sname} -f %{pyproject_files}
@@ -96,6 +99,9 @@ rm -rf doc/build/html/.{doctrees,buildinfo}
 
 
 %changelog
+* Tue Jun 09 2026 Steve Traylen <steve.traylen@cern.ch> - 1.6.16-4
+- Run tests in spec file under tox
+
 * Thu Jun 04 2026 Python Maint <python-maint@redhat.com> - 1.6.16-3
 - Rebuilt for Python 3.15
 

                 reply	other threads:[~2026-06-09 15:05 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=178101754694.1.9840987155841934029.rpms-python-pyghmi-382586105b27@fedoraproject.org \
    --to=steve.traylen@cern.ch \
    --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