File python-aafigure.spec of Package python-aafigure
#
# spec file for package python-aafigure
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-aafigure
Version: 0.6
Release: 0
Summary: Parse documents as ASCII art
License: BSD-3-Clause
URL: https://launchpad.net/aafigure
Source0: https://files.pythonhosted.org/packages/source/a/aafigure/aafigure-%{version}.tar.gz
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module svg2rlg}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
ASCII art figures can be parsed and output as SVG, PNG, JPEG, PDF and more.
%prep
%setup -q -n aafigure-%{version}
sed -i -e '1{/^#!/d}' \
aafigure/__main__.py \
aafigure/aafigure.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/aafigure
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%post
%python_install_alternative aafigure
%postun
%python_uninstall_alternative aafigure
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.txt README.rst
%python_alternative %{_bindir}/aafigure
%{python_sitelib}/*
%changelog