From 8832c0c5cba21958d5040af25cc06d1cead23bf5214996c0be9605dc7b7b78cf Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 30 Mar 2025 20:23:05 +0000 Subject: [PATCH] - add no-mypy-test-plugin.patch: skip pytest-mypy dependency OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-xarray?expand=0&rev=112 --- local_dataset.patch | 8 +++++--- no-mypy-test-plugin.patch | 13 +++++++++++++ python-xarray.changes | 1 + python-xarray.spec | 5 ++++- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 no-mypy-test-plugin.patch diff --git a/local_dataset.patch b/local_dataset.patch index 8b72f21..ceae4b3 100644 --- a/local_dataset.patch +++ b/local_dataset.patch @@ -1,6 +1,8 @@ ---- xarray-2024.11.0/xarray/tutorial.py 2024-11-22 21:58:55.000000000 +0100 -+++ xarray-2024.11.0/xarray/tutorial.py.new 2024-11-24 14:18:51.684909924 +0100 -@@ -162,9 +162,11 @@ +Index: xarray-2025.03.0/xarray/tutorial.py +=================================================================== +--- xarray-2025.03.0.orig/xarray/tutorial.py ++++ xarray-2025.03.0/xarray/tutorial.py +@@ -164,9 +164,11 @@ def open_dataset( downloader = pooch.HTTPDownloader(headers=headers) # retrieve the file diff --git a/no-mypy-test-plugin.patch b/no-mypy-test-plugin.patch new file mode 100644 index 0000000..6072cd2 --- /dev/null +++ b/no-mypy-test-plugin.patch @@ -0,0 +1,13 @@ +Index: xarray-2025.03.0/pyproject.toml +=================================================================== +--- xarray-2025.03.0.orig/pyproject.toml ++++ xarray-2025.03.0/pyproject.toml +@@ -296,8 +296,6 @@ ban-relative-imports = "all" + addopts = [ + "--strict-config", + "--strict-markers", +- "--mypy-only-local-stub", +- "--mypy-pyproject-toml-file=pyproject.toml", + ] + + # We want to forbid warnings from within xarray in our tests — instead we should diff --git a/python-xarray.changes b/python-xarray.changes index 27d5332..5119dea 100644 --- a/python-xarray.changes +++ b/python-xarray.changes @@ -120,6 +120,7 @@ Sun Mar 30 08:19:37 UTC 2025 - Dirk Müller * Enhance and move ISO-8601 parser to coding.times * fix warning from scipy backend guess_can_open on directory * time coding refactor +- add no-mypy-test-plugin.patch: skip pytest-mypy dependency ------------------------------------------------------------------- Fri Dec 6 12:27:55 UTC 2024 - Ben Greiner diff --git a/python-xarray.spec b/python-xarray.spec index 26ff87b..c86e53b 100644 --- a/python-xarray.spec +++ b/python-xarray.spec @@ -36,6 +36,8 @@ Source: https://github.com/pydata/xarray/archive/refs/tags/v%{version}.t # PATCH-FEATURE-UPSTREAM local_dataset.patch gh#pydata/xarray#5377 mcepl@suse.com # fix xr.tutorial.open_dataset to work with the preloaded cache. Patch0: local_dataset.patch +# PATCH-FIX-OPENSUSE: skip dependency on pytest-mypy +Patch1: no-mypy-test-plugin.patch BuildRequires: %{python_module base >= 3.9} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools_scm} @@ -133,6 +135,8 @@ The [io] extra for xarray, N-D labeled arrays and datasets in Python + + #%%package parallel #Summary: The python xarray[parallel] extra #Requires: python-dask-complete >= 2023.11 @@ -140,7 +144,6 @@ The [io] extra for xarray, N-D labeled arrays and datasets in Python # #%description parallel #The [parallel] extra for xarray, N-D labeled arrays and datasets in Python - %package viz Summary: The python xarray[viz] extra Requires: python-matplotlib