Files
python-mpld3/python-mpld3.spec
Matej Cepl 2d7db38625 - Update to version 0.5.7:
Unfortunately, I am not able to find a changelog anywhere, so
  this is just edited list of commit messages:
  - Bump to 0.5.2, attempt to fix docs, fix very deprecated
    pandas and nu…
  - Add an option to not include JS libraries in HTML.
  - Update package.json with new version
  - Treat browserify as default, update require mechanism
  - Fix outdated dependency and update RELEASING.md
  - Clean up test_ticklabels.py
  - Remove test_tickformat_index as it has been replaced by
    FuncFormatter…
  - Update documentation code to work with Python 3
  - Update long_description_content_type

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-mpld3?expand=0&rev=4
2022-02-07 02:16:31 +00:00

111 lines
3.4 KiB
RPMSpec

#
# spec file for package python-mpld3
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# 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.7
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
# PATCH-FIX-UPSTREAM remove-nose.patch gh#mpld3/mpld3#505 mcepl@suse.com
# there are just few SkipTests which need to be imported from stdlib
Patch0: remove-nose.patch
BuildRequires: %{python_module Jinja2 >= 2.7}
BuildRequires: %{python_module matplotlib >= 2.2}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2 >= 2.7
Requires: python-matplotlib >= 2.2
Requires: python-pandas
Recommends: jupyter-notebook
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module diffimg}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
%endif
%python_subpackages
%description
This is an interactive D3js-based viewer which brings matplotlib graphics to the browser.
Please visit http://mpld3.github.io for documentation and examples.
mpld3 provides a custom stand-alone javascript library built on D3, which
parses JSON representations of plots. The mpld3 python module provides a
set of routines which parses matplotlib plots (using the mplexporter
framework) and outputs the JSON description readable by mpld3.js.
%package -n %{name}-doc
Summary: Documentation for %{name}
Group: Development/Languages/Python
Recommends: python3-jupyter_ipython >= 2.0
Provides: %{python_module %{name} = %{version}}
%description -n %{name}-doc
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 \
mpld3.egg-info/*
%build
%python_build
%install
%python_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
%files %{python_files}
%license LICENSE
%doc AUTHORS.md README.md
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
%files -n %{name}-doc
%doc examples/ notebooks/
%changelog