%global pypi_name astunparse
Name: python-%{pypi_name}
Version: 1.6.3
Release: %autorelease
Summary: An AST unparser for Python
# Primarily under the terms of BSD
# The unparse and the test_unparse modules are under the PSF license.
License: BSD and Python
URL: https://github.com/simonpercivall/astunparse
Source0: %{pypi_source}
# Python 3.9+ support
# https://github.com/simonpercivall/astunparse/pull/57
Patch1: python3.9.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-six
BuildRequires: python3-wheel
%description
This is a factored out version of unparse found in the Python source
distribution; under Tools/parser in Python 3.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
This is a factored out version of unparse found in the Python source
distribution; under Tools/parser in Python 3.
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%py3_build
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%changelog
%autochangelog