%{!?python3_pkgversion:%global python3_pkgversion 3} # EL7 does not have a new enough python-setuptools %if 0%{?rhel} && 0%{?rhel} <= 7 %global python3_pkgversion 34 %endif %global pypi_name awacs Name: python-%{pypi_name} Version: 0.8.1 Release: 1%{?dist} Summary: awacs - Amazon Web Access Control Subsystem License: BSD-2-Clause URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://pypi.python.org/packages/%{pypi_name}-%{version}.tar.gz # Source0: https://pypi.python.org/pypi/%{pypi_name}/%{version} BuildArch: noarch BuildRequires: python-devel BuildRequires: pytest BuildRequires: libyaml-devel BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest Requires: python-slimit %description The awacs library allows for easier creation of AWS Access Policy Language JSON by writing Python code to describe the AWS policies. To facilitate catching policy format or JSON errors early the library has property and type checking built into the classes. %package -n python%{python3_pkgversion}-%{pypi_name} Summary: awacs - Amazon Web Access Control Subsystem %{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} Requires: python%{python3_pkgversion}-slimit %description -n python%{python3_pkgversion}-%{pypi_name} The awacs library allows for easier creation of AWS Access Policy Language JSON by writing Python code to describe the AWS policies. To facilitate catching policy format or JSON errors early the library has property and type checking built into the classes. %prep %setup -q -n %{pypi_name}-%{version} %build %py2_build %py3_build %install %py3_install rm -fr %{buildroot}%{python3_sitelib}/tests %py2_install rm -fr %{buildroot}%{python2_sitelib}/tests %check # %{__python2} setup.py test # %{__python3} setup.py test %files %doc README.rst %license LICENSE %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python%{python3_pkgversion}-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Thu Sep 27 2018 Aram Minasyan - 2.1.1-1 - Update to 0.8.1 version. * Tue Nov 28 2017 Aram Minasyan - 2.1.1-1 - Initial RPM Package.