File python-drawsvg.spec of Package python-drawsvg
#
# spec file for package python-drawsvg
#
# Copyright (c) 2025 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/
#
Name: python-drawsvg
Version: 2.4.0
Release: 0
Summary: A Python library for programmatically generating SVG images and animations
License: MIT
URL: https://github.com/cduck/drawsvg
Source: drawsvg-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release}
BuildArch: noarch
%python_subpackages
%description
A Python 3 library for programmatically generating SVG images and animations
that can render and display your drawings in a Jupyter notebook or Jupyter lab.
Most common SVG tags are supported and others can easily be added by writing a
small subclass of `DrawableBasicElement` or `DrawableParentElement`.
%package raster
Summary: PNG, Raster image/video support
Requires: %{name} = %{version}-%{release}
Requires: cairo
Requires: python-CairoSVG
Requires: python-numpy >= 1.16
Requires: python-imageio >= 2.5
Requires: python-imageio-ffmpeg >= 0.4
%description raster
Python extra dependency `raster` for python-drawsvg. Add PNG, raster
image/video support.
%package color
Summary: Extra color
Requires: %{name} = %{version}-%{release}
Requires: python-pwkit >= 1.0
Requires: python-numpy >= 1.16
%description color
Python extra dependency `color` for python-drawsvg.
%prep
%autosetup -p1 -n drawsvg-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%{python_sitelib}/drawsvg
%{python_sitelib}/drawsvg-%{version}.dist-info
%files %{python_files raster}
%files %{python_files color}
%changelog