File python-ramlfications.spec of Package python-ramlfications

#
# spec file for package python-ramlfications
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-%{**}}
%define skip_python2 1
Name:           python-ramlfications
Version:        0.1.9
Release:        0
Summary:        A Python RAML parser
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://ramlfications.readthedocs.org
Source:         ramlfications-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module PyYAML}
BuildRequires:  %{python_module attrs}
BuildRequires:  %{python_module click}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module jsonref}
BuildRequires:  %{python_module markdown2}
# test requirements
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module six}
BuildRequires:  %{python_module termcolor}
BuildRequires:  %{python_module xmltodict}
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires:       python-PyYAML
Requires:       python-attrs
Requires:       python-click
Requires:       python-jsonref
Requires:       python-markdown2
Requires:       python-six
Requires:       python-termcolor
Requires:       python-xmltodict
Suggests:       python-requests
BuildArch:      noarch

%python_subpackages


%description
ramlfications is an Apache 2.0-licensed reference implementation of a RAML parser in Python intended to be used for parsing API definitions (e.g. for static documentation-generation).

If you’ve never heard of RAML, you’re missing out:

    RESTful API Modeling Language (RAML) is a simple and succinct way of describing practically-RESTful APIs. It encourages reuse, enables discovery and pattern-sharing, and aims for merit-based emergence of best practices. The goal is to help our current API ecosystem by solving immediate problems and then encourage ever-better API patterns. RAML is built on broadly-used standards such as YAML and JSON and is a non-proprietary, vendor-neutral open spec.

%prep
%setup -q -n ramlfications-%{version}

%build
%python_build

%install
%python_install

%python_clone -a %{buildroot}%{_bindir}/ramlfications

%post
%python_install_alternative ramlfications

%postun
%python_uninstall_alternative ramlfications

%files %{python_files}
%license LICENSE
%doc AUTHORS.rst README.rst
%python_alternative %{_bindir}/ramlfications
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by