File python-myst-parser.spec of Package python-myst-parser

#
# spec file for package python-myst-parser
#
# 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/
#


%define skip_python2 1
%define skip_python36 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-myst-parser
Version:        0.15.2
Release:        0
Summary:        An extended commonmark compliant parser, with bridges to docutils & sphinx
License:        MIT
URL:            https://github.com/executablebooks/MyST-Parser
Source:         https://files.pythonhosted.org/packages/source/m/myst-parser/myst-parser-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  %{python_module docutils >= 0.15}
BuildRequires:  %{python_module Jinja2}
BuildRequires:  %{python_module markdown-it-py}
BuildRequires:  %{python_module mdit-py-plugins}
BuildRequires:  %{python_module PyYAML}
BuildRequires:  %{python_module Sphinx >= 3.1}
Requires:       python-docutils >= 0.15
Requires:       python-Jinja2
Requires:       python-markdown-it-py
Requires:       python-mdit-py-plugins
Requires:       python-PyYAML
Requires:       python-Sphinx >= 3.1
Requires(post): update-alternatives
Requires(postun): update-alternatives
Suggests:       python-linkify-it-py
BuildArch:      noarch
%python_subpackages

%description
An extended commonmark compliant parser, with bridges to docutils & sphinx.

%prep
%setup -q -n myst-parser-%{version}

%build
%python_build

%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/myst-anchors
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative myst-anchors

%postun
%python_uninstall_alternative myst-anchors

%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE
%python_alternative %{_bindir}/myst-anchors
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by