File python-rnc2rng.spec of Package python-rnc2rng

#
# spec file for package python-rnc2rng
#
# 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-rnc2rng
Version:        2.6.5
Release:        0
Summary:        RELAX NG Compact to regular syntax conversion library
License:        UNKNOWN (FIXME:No SPDX)
URL:            https://github.com/djc/rnc2rng
Source:         https://files.pythonhosted.org/packages/source/r/rnc2rng/rnc2rng-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module rply}
# /SECTION
BuildRequires:  fdupes
Requires:       python-rply
BuildArch:      noarch
%python_subpackages

%description
RELAX NG Compact to regular syntax conversion library

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

%build
%python_build

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

%check
# FileNotFoundError: [Errno 2] No such file or directory: 'runTest'
export PYTHONPATH=${PWD}
#%%pyunittest -v

%post
%python_install_alternative rnc2rng

%postun
%python_uninstall_alternative rnc2rng

%files %{python_files}
%doc AUTHORS README.rst
%python_alternative %{_bindir}/rnc2rng
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by