%global pypi_name click Name: python-%{pypi_name} Version: 7.0 Release: 1 Summary: Composable command line interface toolkit License: BSD URL: https://palletsprojects.com/p/click/ Source0: https://github.com/pallets/click/archive/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %global _description \ click is a Python package for creating beautiful command line\ interfaces in a composable way with as little amount of code as necessary.\ It's the "Command Line Interface Creation Kit". It's highly configurable but\ comes with good defaults out of the box. %description %{_description} %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest %description -n python2-%{pypi_name} %{_description} Python 2 version. %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest %description -n python3-%{pypi_name} %{_description} Python 3 version. %package help Summary: Development documents and examples for Click %description help %{summary}. %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir}/ cp -arf docs/ examples/ %{buildroot}/%{_pkgdocdir}/ %check export PYTHONPATH=$(pwd) py.test-%{python2_version} tests --tb=long --verbose py.test-%{python3_version} tests --tb=long --verbose %files -n python2-%{pypi_name} %license LICENSE.rst %doc README.rst CHANGES.rst %{python2_sitelib}/Click-*.egg-info/ %{python2_sitelib}/%{pypi_name}/ %files -n python3-%{pypi_name} %license LICENSE.rst %doc README.rst CHANGES.rst %{python3_sitelib}/Click-*.egg-info/ %{python3_sitelib}/%{pypi_name}/ %files help %{_pkgdocdir}/ %changelog * Fri Nov 1 2019 shanshishi - 7.0-1 - Init package