SHA256
1
0
forked from pool/python-mpld3

Accepting request 1057068 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/1057068
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mpld3?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2023-01-09 16:24:17 +00:00 committed by Git OBS Bridge
commit f91f48c3db
5 changed files with 49 additions and 33 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a167dbef836dd7c66d8aa71c06a32d50bffa18725f304d93cb74fdb3545043b
size 2326011

3
mpld3-0.5.9.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8d228b2911132fd0154e2a49543b7f97247f9851cfe468c6b616f452c676158
size 1026083

View File

@ -0,0 +1,13 @@
Index: mpld3-0.5.9/mpld3/tests/test_elements.py
===================================================================
--- mpld3-0.5.9.orig/mpld3/tests/test_elements.py
+++ mpld3-0.5.9/mpld3/tests/test_elements.py
@@ -22,7 +22,7 @@ def test_line():
assert_equal(line['alpha'], 0.3)
assert_equal(line['color'], "#000000")
assert_equal(line['coordinates'], 'data')
- assert_equal(line['dasharray'], '7.4,3.2')
+ assert line['dasharray'] in ['7.4,3.2', '6,6']
assert_equal(line['zorder'], 10)
assert_equal(line['linewidth'], 2)

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Sat Jan 7 20:43:25 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.5.9
* no release notes
* bumps some js versions, doc changes
- Remove bcond_without test: tests were run all along
- Fix failing test suite:
* Add mpld3-pr516-dasharray.patch gh#mpld3/mpld3#516
-------------------------------------------------------------------
Mon May 30 22:22:31 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-mpld3
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,35 @@
#
# No numpy for py3.6
%define skip_python36 1
%define modname mpld3
# Tests are not designed to be non-interactively run, see README.md
%bcond_without test
Name: python-mpld3
Version: 0.5.8
Version: 0.5.9
Release: 0
Summary: D3 Viewer for Matplotlib
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://mpld3.github.com
Source0: https://files.pythonhosted.org/packages/source/m/mpld3/%{modname}-%{version}.tar.gz
# Originally from https://raw.githubusercontent.com/mpld3/mpld3/master/visualize_tests.py
Source1: visualize_tests.py
BuildRequires: %{python_module Jinja2 >= 2.7}
BuildRequires: %{python_module matplotlib >= 2.2}
BuildRequires: %{python_module pandas}
URL: https://mpld3.github.io
# SourceRepository: https://github.com/mpld3/mpld3
Source0: https://files.pythonhosted.org/packages/source/m/mpld3/mpld3-%{version}.tar.gz
Source1: https://github.com/mpld3/mpld3/raw/v%{version}/visualize_tests.py
# PATCH-FIX-UPSTREAM mpld3-pr516-dasharray.patch gh#mpld3/mpld3#516
Patch1: mpld3-pr516-dasharray.patch
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2 >= 2.7
Requires: python-matplotlib >= 2.2
Requires: python-pandas
Requires: python-Jinja2
Requires: python-matplotlib
Recommends: jupyter-notebook
BuildArch: noarch
%if %{with test}
# SECTION test
BuildRequires: %{python_module diffimg}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pytest}
%endif
# /SECTION
%python_subpackages
%description
@ -69,37 +67,32 @@ Documentation and examples for %{name}
%prep
%autosetup -p1 -n mpld3-%{version}
cp %{SOURCE1} .
chmod -x examples/*.py
# Fix a bunch of inappropriate exec perms
chmod a-x notebooks/*.ipynb \
LICENSE \
*.md \
mpld3/js/*.js \
examples/*.py \
mpld3.egg-info/*
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
export HIDE_PLOTS=True
# exclusions gh#mpld3/mpld3#505
%pytest -k 'not (test_show or test_snapshots)' mpld3/tests/*.py
%endif
%pytest
%files %{python_files}
%license LICENSE
%doc AUTHORS.md README.md
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
%{python_sitelib}/mpld3/
%{python_sitelib}/mpld3-%{version}.dist-info
%files -n %{name}-doc
%doc examples/ notebooks/