From 14c4f7bbfdfa1327f1c06e42cef5f1c66b5810b7d91a3c89f769f756ad8a1bcc Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 5 Aug 2022 13:47:49 +0000 Subject: [PATCH] Accepting request 993266 from home:bnavigator:setuptools63 - Add pip-run-suse-ring1-no-nbformat.patch for removal of nbformat from Ring1 (pip-run will be in Ring1 for setuptools:test) OBS-URL: https://build.opensuse.org/request/show/993266 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pip-run?expand=0&rev=3 --- pip-run-suse-ring1-no-nbformat.patch | 21 +++++++++++++++++++++ python-pip-run.changes | 6 ++++++ python-pip-run.spec | 25 ++++++++++++++++--------- 3 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 pip-run-suse-ring1-no-nbformat.patch diff --git a/pip-run-suse-ring1-no-nbformat.patch b/pip-run-suse-ring1-no-nbformat.patch new file mode 100644 index 0000000..ec5e0f3 --- /dev/null +++ b/pip-run-suse-ring1-no-nbformat.patch @@ -0,0 +1,21 @@ +Index: pip-run-8.8.1/pip_run/tests/test_scripts.py +=================================================================== +--- pip-run-8.8.1.orig/pip_run/tests/test_scripts.py ++++ pip-run-8.8.1/pip_run/tests/test_scripts.py +@@ -4,7 +4,6 @@ import sys + import subprocess + + import pytest +-import nbformat + + from pip_run import scripts + +@@ -85,6 +84,8 @@ class TestSourceDepsReader: + class TestNotebookDepsReader: + @pytest.fixture + def notebook_factory(self, tmpdir, request): ++ nbformat = pytest.importorskip("nbformat") ++ + class Factory: + def __init__(self): + self.nb = nbformat.v4.new_notebook() diff --git a/python-pip-run.changes b/python-pip-run.changes index 2137590..d8c1960 100644 --- a/python-pip-run.changes +++ b/python-pip-run.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 5 09:14:48 UTC 2022 - Ben Greiner + +- Add pip-run-suse-ring1-no-nbformat.patch for removal of nbformat + from Ring1 (pip-run will be in Ring1 for setuptools:test) + ------------------------------------------------------------------- Wed Jul 13 14:27:22 UTC 2022 - Ben Greiner diff --git a/python-pip-run.spec b/python-pip-run.spec index d8893ae..edc8da4 100644 --- a/python-pip-run.spec +++ b/python-pip-run.spec @@ -1,5 +1,5 @@ # -# spec file for package python-pip-run +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test @@ -23,6 +24,8 @@ %define psuffix %{nil} %bcond_with test %endif +# Disables installing nbformat for tests in Ring1 (see also Patch1) +%bcond_with ringdisabled Name: python-pip-run%{psuffix} Version: 8.8.1 @@ -34,28 +37,32 @@ Source: https://files.pythonhosted.org/packages/source/p/pip-run/pip-run # Needs the wheels for path and path.py for testing Source10: https://files.pythonhosted.org/packages/py3/p/path.py/path.py-12.5.0-py3-none-any.whl Source11: https://files.pythonhosted.org/packages/py3/p/path/path-16.4.0-py3-none-any.whl -BuildRequires: python-rpm-macros -BuildRequires: %{python_module setuptools >= 56} -BuildRequires: %{python_module setuptools_scm >= 3.4.1} +# PATCH-FEATURE-OPENSUSE pip-run-suse-ring1-no-nbformat.patch code@bnavigator.de -- Don't test with nbformat if not available +Patch1: pip-run-suse-ring1-no-nbformat.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 56} +BuildRequires: %{python_module setuptools_scm >= 3.4.1} BuildRequires: %{python_module wheel} BuildRequires: fdupes -Requires: python-pip >= 19.3 +BuildRequires: python-rpm-macros Requires: python-autocommand -Requires: python-path >= 15.1 Requires: python-packaging +Requires: python-path >= 15.1 +Requires: python-pip >= 19.3 Requires(post): update-alternatives Requires(postun):update-alternatives %if 0%{?python_version_nodots} < 38 Requires: python-importlib-metadata %endif %if %{with test} +BuildRequires: %{python_module Pygments} BuildRequires: %{python_module pip-run = %{version}} BuildRequires: %{python_module pytest >= 6} -BuildRequires: %{python_module nbformat} -BuildRequires: %{python_module Pygments} BuildRequires: ca-certificates +%if !%{with ringdisabled} +BuildRequires: %{python_module nbformat} +%endif %endif BuildArch: noarch %python_subpackages @@ -76,7 +83,7 @@ pip-run is a compliment to Pip and Virtualenv and Setuptools, intended to more readily address the on-demand needs. %prep -%setup -q -n pip-run-%{version} +%autosetup -p1 -n pip-run-%{version} %if !%{with test} %build