%global pypi_name astunparse Name: python-%{pypi_name} Version: 1.6.2 Release: 2%{?dist} Summary: An AST unparser for Python License: BSD URL: https://github.com/simonpercivall/astunparse Source0: https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(six) < 2.0 BuildRequires: python3dist(six) >= 1.6.1 BuildRequires: python3dist(wheel) < 1.0 BuildRequires: python3dist(wheel) >= 0.23.0 %description AST Unparser An AST unparser for Python.This is a factored out version of unparse found in the Python source distribution; under Demo/parser in Python 2 and under Tools/parser in Python 3.Basic example:: import inspect import ast import astunparse %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(six) < 2.0 Requires: python3dist(six) >= 1.6.1 Requires: python3dist(wheel) < 1.0 Requires: python3dist(wheel) >= 0.23.0 %description -n python3-%{pypi_name} AST Unparser An AST unparser for Python.This is a factored out version of unparse found in the Python source distribution; under Demo/parser in Python 2 and under Tools/parser in Python 3.Basic example:: import inspect import ast import astunparse %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build %install # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py 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?.?.egg-info %changelog * Fri Mar 15 2019 Ruslan Pisarev - 1.6.2-2 - Removed Python 2 subpackage * Wed Mar 13 2019 Ruslan Pisarev - 1.6.2-1 - Initial package.