From d0f7770a0e45682b11c3ffa7575219ca3e55e68a3007fc5b82a13a772e83bcde Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 15 Nov 2021 19:05:43 +0000 Subject: [PATCH] Accepting request 931615 from home:bnavigator:branches:devel:languages:python:jupyter - Avoid buildcycle with test multibuild OBS-URL: https://build.opensuse.org/request/show/931615 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyterlab-pygments?expand=0&rev=8 --- _multibuild | 3 +++ python-jupyterlab-pygments.changes | 5 +++++ python-jupyterlab-pygments.spec | 27 ++++++++++++++++++++++----- 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..ec2fdbb --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + \ No newline at end of file diff --git a/python-jupyterlab-pygments.changes b/python-jupyterlab-pygments.changes index a6c7d31..7cc136e 100644 --- a/python-jupyterlab-pygments.changes +++ b/python-jupyterlab-pygments.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 15 19:01:14 UTC 2021 - Ben Greiner + +- Avoid buildcycle with test multibuild + ------------------------------------------------------------------- Sun Nov 14 18:02:29 UTC 2021 - Ben Greiner diff --git a/python-jupyterlab-pygments.spec b/python-jupyterlab-pygments.spec index c2571c8..bf394ea 100644 --- a/python-jupyterlab-pygments.spec +++ b/python-jupyterlab-pygments.spec @@ -1,5 +1,5 @@ # -# spec file for package python-jupyterlab-pygments +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -16,9 +16,18 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -Name: python-jupyterlab-pygments +Name: python-jupyterlab-pygments%{psuffix} Version: 0.1.2 Release: 0 Summary: Pygments theme for jupyterlab @@ -27,14 +36,16 @@ Group: Development/Languages/Python URL: https://github.com/jupyterlab/jupyterlab_pygments Source: https://files.pythonhosted.org/packages/source/j/jupyterlab_pygments/jupyterlab_pygments-%{version}.tar.gz Source1: https://raw.githubusercontent.com/jupyterlab/jupyterlab_pygments/%{version}/notebooks/Example.ipynb -BuildRequires: %{python_module nbval} -BuildRequires: %{python_module pygments >= 2.4.1} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pygments >= 2.4.1 BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module jupyterlab-pygments = %{version}} +BuildRequires: %{python_module nbval} +BuildRequires: %{python_module pytest} +%endif %python_subpackages %description @@ -44,20 +55,26 @@ of the JupyterLab CSS variables. %prep %setup -q -n jupyterlab_pygments-%{version} +%if !%{with test} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} %check %pytest --nbval-lax %{SOURCE1} +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc README.md %{python_sitelib}/jupyterlab_pygments %{python_sitelib}/jupyterlab_pygments-%{version}*-info +%endif %changelog