15
0

osc copypac from project:home:Rotkraut:Data package:python-ansi2html revision:1

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansi2html?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2019-02-14 13:30:33 +00:00
committed by Git OBS Bridge
commit 108e0a399e
5 changed files with 90 additions and 0 deletions

58
python-ansi2html.spec Normal file
View File

@@ -0,0 +1,58 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ansi2html
Version: 1.2.0
Release: 0
Summary: Convert text with ANSI color codes to HTML or to LaTeX
License: GPL-3.0+
Group: Development/Languages/Python
Url: https://github.com/ralphbean/ansi2html/
Source: ansi2html-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
Requires: python-six
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%python_subpackages
%description
Convert text with ANSI color codes to HTML or to LaTeX.
%prep
%setup -q -n ansi2html-%{version}
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/ansi2html
%post
%python_install_alternative ansi2html
%postun
%python_uninstall_alternative ansi2html
%clean
rm -rf %{buildroot}
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%python_alternative %{_bindir}/ansi2html
%{python_sitelib}/*
%changelog