Accepting request 998388 from home:bnavigator:branches:devel:languages:python:jupyter
- Remove python36 skiptest code - Add nbval-sanitize-figure-size.patch * gh#computationalmodelling/nbval#183 - Multibuild test flavor: avoid (possible) build cycle OBS-URL: https://build.opensuse.org/request/show/998388 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-nbval?expand=0&rev=20
This commit is contained in:
parent
bc925d42e2
commit
a1f2757b89
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
15
nbval-sanitize-figure-size.patch
Normal file
15
nbval-sanitize-figure-size.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Index: nbval-0.9.6/tests/sanitize_defaults.cfg
|
||||||
|
===================================================================
|
||||||
|
--- nbval-0.9.6.orig/tests/sanitize_defaults.cfg
|
||||||
|
+++ nbval-0.9.6/tests/sanitize_defaults.cfg
|
||||||
|
@@ -13,4 +13,8 @@ replace: TIMESTAMP
|
||||||
|
|
||||||
|
[Memory addresses]
|
||||||
|
regex: (<[a-zA-Z_][0-9a-zA-Z_.]* at )(0x[0-9a-fA-F]+)(>)
|
||||||
|
-replace: \1MEMORY_ADDRESS\3
|
||||||
|
\ No newline at end of file
|
||||||
|
+replace: \1MEMORY_ADDRESS\3
|
||||||
|
+
|
||||||
|
+[Matplotlib figure size]
|
||||||
|
+regex: (Figure size )\d+x\d+( with \d+ Axes)
|
||||||
|
+replace: \1WIDTHxHEIGHT\2
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 20 17:48:52 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Remove python36 skiptest code
|
||||||
|
- Add nbval-sanitize-figure-size.patch
|
||||||
|
* gh#computationalmodelling/nbval#183
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 15 18:46:36 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Multibuild test flavor: avoid (possible) build cycle
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 29 13:12:23 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Sun Aug 29 13:12:23 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-nbval
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,9 +16,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%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
|
%define skip_python2 1
|
||||||
Name: python-nbval
|
Name: python-nbval%{psuffix}
|
||||||
Version: 0.9.6
|
Version: 0.9.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A pytest plugin to validate Jupyter notebooks
|
Summary: A pytest plugin to validate Jupyter notebooks
|
||||||
@ -31,38 +40,26 @@ Patch0: nbval-filter-mpldeprecation.patch
|
|||||||
# PATCH-FIX-UPSTREAM 0001-Make-tests-pass-with-ipykernel-6.0.0.patch -- Taken from archlinux, yan12125@gmail.com
|
# PATCH-FIX-UPSTREAM 0001-Make-tests-pass-with-ipykernel-6.0.0.patch -- Taken from archlinux, yan12125@gmail.com
|
||||||
# https://github.com/archlinux/svntogit-community/blob/0aeb3d7e25d351606f46becc33f79e1c369572d0/python-nbval/trunk/0001-Make-tests-pass-with-ipykernel-6.0.0.patch (with whitespace changes)
|
# https://github.com/archlinux/svntogit-community/blob/0aeb3d7e25d351606f46becc33f79e1c369572d0/python-nbval/trunk/0001-Make-tests-pass-with-ipykernel-6.0.0.patch (with whitespace changes)
|
||||||
Patch1: 0001-Make-tests-pass-with-ipykernel-6.0.0.patch
|
Patch1: 0001-Make-tests-pass-with-ipykernel-6.0.0.patch
|
||||||
|
# PATCH-FIX-UPSTREAM nbval-sanitize-figure-size.patch gh#computationalmodelling/nbval#183
|
||||||
|
Patch2: nbval-sanitize-figure-size.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-certifi
|
|
||||||
Requires: python-coverage
|
Requires: python-coverage
|
||||||
Requires: python-ipykernel
|
Requires: python-ipykernel
|
||||||
Requires: python-jupyter-client
|
Requires: python-jupyter-client
|
||||||
Requires: python-nbdime
|
|
||||||
Requires: python-nbformat
|
Requires: python-nbformat
|
||||||
Requires: python-pytest >= 2.8
|
Requires: python-pytest >= 2.8
|
||||||
Recommends: python-matplotlib
|
Requires: python-six
|
||||||
Recommends: python-pytest-cov
|
|
||||||
Recommends: python-pytest-timeout
|
|
||||||
Recommends: python-sympy
|
|
||||||
Provides: python-jupyter_nbval = %{version}
|
Provides: python-jupyter_nbval = %{version}
|
||||||
Obsoletes: python-jupyter_nbval < %{version}
|
Obsoletes: python-jupyter_nbval < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
%if %{with test}
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module matplotlib}
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module nbval = %{version}}
|
||||||
BuildRequires: %{python_module ipykernel}
|
|
||||||
BuildRequires: %{python_module jupyter-client}
|
|
||||||
BuildRequires: %{python_module nbdime}
|
|
||||||
BuildRequires: %{python_module nbformat}
|
|
||||||
BuildRequires: %{python_module notebook}
|
|
||||||
BuildRequires: %{python_module pyinotify}
|
|
||||||
BuildRequires: %{python_module pytest >= 2.8}
|
|
||||||
BuildRequires: %{python_module pytest-cov}
|
BuildRequires: %{python_module pytest-cov}
|
||||||
BuildRequires: %{python_module pytest-timeout}
|
|
||||||
BuildRequires: %{python_module sympy}
|
BuildRequires: %{python_module sympy}
|
||||||
BuildRequires: %{python_module matplotlib if (%python-base without python36-base)}
|
%endif
|
||||||
# /SECTION
|
|
||||||
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
|
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
|
||||||
Provides: jupyter-nbval = %{version}
|
Provides: jupyter-nbval = %{version}
|
||||||
%endif
|
%endif
|
||||||
@ -85,6 +82,7 @@ expected output will fail.
|
|||||||
%autosetup -p1 -n nbval-%{version}
|
%autosetup -p1 -n nbval-%{version}
|
||||||
sed -i 's/\r$//' README.md
|
sed -i 's/\r$//' README.md
|
||||||
|
|
||||||
|
%if ! %{with test}
|
||||||
%build
|
%build
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
%python_build
|
%python_build
|
||||||
@ -93,20 +91,24 @@ export LANG=en_US.UTF-8
|
|||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
python36_donttest="(sample_notebook and 9) or (test_coalesce and 5)"
|
|
||||||
# see dodo.py for call signature
|
# see dodo.py for call signature
|
||||||
%{pytest tests/ --nbval \
|
%{pytest tests/ --nbval \
|
||||||
--current-env \
|
--current-env \
|
||||||
--sanitize-with tests/sanitize_defaults.cfg \
|
--sanitize-with tests/sanitize_defaults.cfg \
|
||||||
--ignore tests/ipynb-test-samples \
|
--ignore tests/ipynb-test-samples
|
||||||
${$python_donttest:+ -k "not (${$python_donttest})"}
|
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if ! %{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/nbval
|
||||||
|
%{python_sitelib}/nbval-%{version}*-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user