public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jos de Kloe <josdekloe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/pygrib] rawhide: Disable cartopy use in tests to allow rawhide build
Date: Sun, 21 Jun 2026 13:23:51 GMT	[thread overview]
Message-ID: <178204823170.1.2052766849018648918.rpms-pygrib-df9b9fb0447b@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/pygrib
Branch : rawhide
Commit : df9b9fb0447bd4f5df9df5d6173f9c055b0d9469
Author : Jos de Kloe <josdekloe@gmail.com>
Date   : 2026-06-21T15:23:11+02:00
Stats  : +18/-3 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/pygrib/c/df9b9fb0447bd4f5df9df5d6173f9c055b0d9469?branch=rawhide

Log:
Disable cartopy use in tests to allow rawhide build

---
diff --git a/pygrib.spec b/pygrib.spec
index 23f2927..e1e6aad 100644
--- a/pygrib.spec
+++ b/pygrib.spec
@@ -1,9 +1,15 @@
 # avoid providing the private libs:
 %global __provides_exclude_from ^(%{python3_sitearch})/.*\\.so.*$
 
+# Note that cartopy is only used by the test suite, not by the
+# pygrib module it self. Therefore it is safe to set this next switch
+# to 0 to unblock the build if the build of cartopy is delayed
+# at a mayor python upgrade in rawhide.
+%bcond cartopy 0
+
 Name:       pygrib
 Version:    2.1.8
-Release:    3%{?dist}
+Release:    4%{?dist}
 Summary:    Python module for reading and modifying GRIB files
 
 # this software uses the "MIT:Modern Style with sublicense" license
@@ -61,12 +67,13 @@ BuildRequires: python3-numpy
 BuildRequires: python3-pytest
 BuildRequires: python3-pytest-mpl
 BuildRequires: python3-matplotlib
-BuildRequires: python3-cartopy
 BuildRequires: python3-scipy
-
+%if %{with cartopy}
+BuildRequires: python3-cartopy
 # these are needed to prevent cartopy from downloading shape files
 BuildRequires: natural-earth-map-data-110m
 BuildRequires: natural-earth-map-data-50m
+%endif
 
 %global _description \
 Cython wrapper to provide a high-level interface to the ECMWF eccodes \
@@ -151,12 +158,16 @@ cd  $TESTROOT/test
 # execute the doc tests as defined in test/test.py
 %{__python3} test.py
 
+%if %{with cartopy}
+
 # This run script automatically executes all
 # tests in the test folder starting with "test_",
 # but it only executes the data read functionality of pygrib, and
 # does not test generate the test maps by cartopy and does not compare
 # those to the reference maps provided.
 # That is done by the pytest call below.
+# But still these tests do import add_cyclic_point and ccrs from the
+# cartopy module, so need to be switched off if the cartopy bcond is not set.
 %{__python3} run_tests.py
 
 # note: pyspharm is not yet available in fedora
@@ -182,6 +193,7 @@ cd  $TESTROOT/test
 #    test_reglatlon.py
 # This has been reported here:
 # https://github.com/jswhit/pygrib/issues/188
+%endif
 
 %files -n python3-%{name} -f %{pyproject_files}
 %doc LICENSE PKG-INFO README.md
@@ -192,6 +204,9 @@ cd  $TESTROOT/test
 %{_mandir}/man1/grib_*
 
 %changelog
+* Sun Jun 21 2026 Jos de Kloe <josdekloe@gmail.com> 2.1.8-4
+- Disable cartopy use in tests to allow rawhide build
+
 * Sat Jun 06 2026 Jos de Kloe <josdekloe@gmail.com> 2.1.8-3
 - Fix 3 failing tests
 

                 reply	other threads:[~2026-06-21 13:23 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=178204823170.1.2052766849018648918.rpms-pygrib-df9b9fb0447b@fedoraproject.org \
    --to=josdekloe@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