%global pypi_name absl-py Name: python-%{pypi_name} Version: 0.7.0 Release: 1%{?dist} Summary: Abseil Python Common Libraries, see License: Apache 2.0 URL: https://github.com/abseil/abseil-py Source0: https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %if 0%{?fedora} BuildRequires: python2-devel BuildRequires: python2dist(setuptools) BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %else BuildRequires: python2-devel BuildRequires: python2-setuptools %{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif %description Abseil Python Common LibrariesThis repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production. Features* Simple application startup * Distributed commandline flags system * Custom logging module with additional features * Testing utilities Getting Started... %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2dist(enum34) Requires: python2dist(six) %description -n python2-%{pypi_name} Abseil Python Common LibrariesThis repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production. Features* Simple application startup * Distributed commandline flags system * Custom logging module with additional features * Testing utilities Getting Started... %if 0%{?fedora} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3dist(enum34) Requires: python3dist(six) %description -n python3-%{pypi_name} Abseil Python Common LibrariesThis repository is a collection of Python library code for building Python applications. The code is collected from Google's own Python code base, and has been extensively tested and used in production. Features* Simple application startup * Distributed commandline flags system * Custom logging module with additional features * Testing utilities Getting Started... %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?fedora} %py3_build %endif %install # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py install. %py2_install %if 0%{?fedora} %py3_install %endif %files -n python2-%{pypi_name} %doc README.md %{python2_sitelib}/absl %{python2_sitelib}/absl_py-%{version}-py?.?.egg-info %if 0%{?fedora} %files -n python3-%{pypi_name} %doc README.md %{python3_sitelib}/absl %{python3_sitelib}/absl_py-%{version}-py?.?.egg-info %endif %changelog * Sat Mar 09 2019 Ruslan Pisarev - 0.7.0-1 - Initial package.