File python-pyhcl.spec of Package python-pyhcl2

#
# spec file for package python-hcl2
#
# Copyright (c) 2023 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-hcl2
Version:        4.3.0
Release:        0
Summary:        HCL configuration parser for python
License:        MIT
URL:            https://github.com/amplify-education/python-hcl2
Source:         https://files.pythonhosted.org/packages/source/p/python-hcl2/python-hcl2-%{version}.tar.gz
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module wheel}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildArch:      noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires:       python-lark
%python_subpackages

%description
HCL2 configuration parser for python

%prep
%setup -q -n python-hcl2-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/hcl2tojson

%post
%python_install_alternative hcl2tojson

%postun
%python_uninstall_alternative hcl2tojson

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

%changelog
openSUSE Build Service is sponsored by