File python-markdown2.spec of Package python-markdown2

# spec file for package python-markdown2
# 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-markdown2
Version:        2.4.0
Release:        0
Summary:        A Python implementation of Markdown
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module pygments}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  unzip
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch

Markdown2 is a Python implementation of Markdown.
It closely matches the behaviour of the original
Perl-implemented Markdown2 also comes with a number of
extensions (called "extras") for things like syntax coloring, tables,

%setup -q -n markdown2-%{version}


%python_clone -a %{buildroot}%{_bindir}/markdown2
%python_expand %fdupes %{buildroot}%{$python_sitelib}

pushd test
# Exclusion because of gh#trentm/python-markdown2#388
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -- -knownfailure || /bin/true

%python_install_alternative markdown2

%python_uninstall_alternative markdown2

%files %{python_files}
%license LICENSE.txt
%python_alternative %{_bindir}/markdown2

openSUSE Build Service is sponsored by