%if 0%{?fedora} %global _with_python3 1 # Tests disabled on EPEL because of missing dependencies %global _with_tests 1 %endif %global python_module msrestazure %global common_summary AutoRest swagger generator Python client runtime (Azure-specific module) %global common_description %{common_summary}. %global adal_min_version 0.4.0 %global msrest_min_version 0.4.4 Name: python-%{python_module} Version: 0.4.7 Release: 1%{?dist} Summary: %{common_summary} Group: System Environment/Libraries License: MIT URL: https://github.com/Azure/msrestazure-for-python/ Source0: https://github.com/Azure/msrestazure-for-python/archive/v%{version}/%{name}-%{version}.tar.gz # Fix install_requires option, for EPEL especially Patch0: %{name}-0.4.7-build.patch BuildRequires: python-setuptools BuildRequires: python2-devel %if 0%{?_with_python3} BuildRequires: python3-devel %endif %if 0%{?_with_tests} BuildRequires: python-adal >= %{adal_min_version} BuildRequires: python-certifi BuildRequires: python-keyring BuildRequires: python-msrest >= %{msrest_min_version} %if 0%{?_with_python3} BuildRequires: python3-adal >= %{adal_min_version} BuildRequires: python3-certifi BuildRequires: python3-keyring BuildRequires: python3-msrest >= %{msrest_min_version} %endif %endif BuildArch: noarch %description %{common_description} %package -n python2-%{python_module} Summary: %{common_summary} Requires: python-adal >= %{adal_min_version} Requires: python-keyring Requires: python-msrest >= %{msrest_min_version} %{?python_provide:%python_provide python2-%{python_module}} %description -n python2-%{python_module} %{common_description} %if 0%{?_with_python3} %package -n python3-%{python_module} Summary: %{common_summary} Requires: python3-adal >= %{adal_min_version} Requires: python3-keyring Requires: python3-msrest >= %{msrest_min_version} %{?python_provide:%python_provide python3-%{python_module}} %description -n python3-%{python_module} %{common_description} %endif %prep %autosetup -n %{python_module}-for-python-%{version} %build %py2_build %{?_with_python3:%py3_build} %install %py2_install %{?_with_python3:%py3_install} %check %if 0%{?_with_tests} %{__python2} setup.py test %{?_with_python3:%{__python3} setup.py test} %endif %files -n python2-%{python_module} %doc README.rst %license LICENSE.md %{python2_sitelib}/* %if 0%{?_with_python3} %doc README.rst %license LICENSE.md %files -n python3-%{python_module} %{python3_sitelib}/* %endif %changelog * Thu Jan 26 2017 Mohamed El Morabity - 0.4.7-1 - Update to 0.4.7 - Enable check tests, now available in this version * Wed Dec 21 2016 Mohamed El Morabity - 0.4.6-1 - Update to 0.4.6 * Thu Oct 20 2016 Mohamed El Morabity - 0.4.4-1 - Update to 0.4.4 - Remove checks since there's no test * Tue Sep 27 2016 Mohamed El Morabity - 0.4.3-1 - Update to 0.4.3 * Fri Jun 24 2016 Mohamed El Morabity - 0.4.1-1 - Update to 0.4.1 * Thu May 26 2016 Mohamed El Morabity - 0.4.0-1 - Update to 0.4.0 * Sun May 01 2016 Mohamed El Morabity - 0.3.0-1 - Update to 0.3.0 * Fri Apr 01 2016 Mohamed El Morabity - 0.2.1-1 - Update to 0.2.1 * Wed Mar 23 2016 Mohamed El Morabity - 0.1.2-1 - Update to 0.1.3 * Sat Mar 05 2016 Mohamed El Morabity - 0.1.1-1 - Update to 0.1.1 * Wed Mar 02 2016 Mohamed El Morabity - 0.0.2-1 - Update to 0.0.2 * Sun Feb 28 2016 Mohamed El Morabity - 0.0.1-1 - Initial RPM release