%if 0%{?fedora} %global _with_python3 1 # Tests disabled: # - on EPEL because of missing dependencies # - on Fedora < 25 because python-vcrpy >= 1.8.0 is required %if 0%{?fedora} >= 25 %global _with_tests 1 %endif %endif %global alt_name azure-sdk-for-python %global python_module azure-sdk %global prerelease rc6 %global common_summary Microsoft Azure SDK for Python %global common_description This project provides a set of Python packages that make it easy to access the\ Microsoft Azure components such as ServiceManagement, Storage*, and ServiceBus. Name: python-%{python_module} Version: 2.0.0 Release: %{?prerelease:0.}8%{?prerelease:.%{prerelease}}%{?dist} Summary: %{common_summary} Group: System Environment/Libraries # All packages are licensed under the MIT license, except: # - azure-servicebus # - azure-servicemanagement-legacy # - azure-storage License: MIT and ASL 2.0 URL: https://github.com/Azure/azure-sdk-for-python/ Source0: https://github.com/Azure/%{alt_name}/archive/v%{version}%{?prerelease}/%{name}-%{version}%{?prerelease}.tar.gz # Fix tests Patch0: %{name}-2.0.0-tests.patch BuildRequires: python-setuptools BuildRequires: python2-devel # Needed to build documentation BuildRequires: python-pip BuildRequires: python-sphinx BuildRequires: python-sphinx_rtd_theme %if 0%{?_with_python3} BuildRequires: python3-devel %endif # Needed for tests %if 0%{?_with_tests} BuildRequires: python-certifi BuildRequires: python-chardet BuildRequires: python-coverage BuildRequires: python-enum34 BuildRequires: python-isodate BuildRequires: python-keyring BuildRequires: python-msrest >= 0.4.0 BuildRequires: python-msrestazure >= 0.4.0 BuildRequires: python-nose BuildRequires: python-oauthlib BuildRequires: python-requests BuildRequires: python-requests-oauthlib BuildRequires: python-vcrpy >= 1.8.0 %if 0%{?_with_python3} BuildRequires: python3-certifi BuildRequires: python3-chardet BuildRequires: python3-coverage BuildRequires: python3-enum34 BuildRequires: python3-isodate BuildRequires: python3-keyring BuildRequires: python3-msrest >= 0.4.0 BuildRequires: python3-msrestazure >= 0.4.0 BuildRequires: python3-nose BuildRequires: python3-oauthlib BuildRequires: python3-requests BuildRequires: python3-requests-oauthlib BuildRequires: python3-vcrpy >= 1.8.0 %endif %endif BuildArch: noarch %description %{common_description} %package -n python2-%{python_module} Summary: %{common_summary} Requires: pyOpenSSL Requires: python-msrest >= 0.4.0 Requires: python-msrestazure >= 0.4.0 Requires: python-requests %{?python_provide:%python_provide python2-%{python_module}} # Set Provides for each module bundled in the SDK %{?python_provide:%python_provide python-azure} %{?python_provide:%python_provide python2-azure} %{?python_provide:%python_provide python-azure-batch} %{?python_provide:%python_provide python2-azure-batch} %{?python_provide:%python_provide python-azure-common} %{?python_provide:%python_provide python2-azure-common} %{?python_provide:%python_provide python-azure-graphrbac} %{?python_provide:%python_provide python2-azure-graphrbac} %{?python_provide:%python_provide python-azure-mgmt} %{?python_provide:%python_provide python2-azure-mgmt} %{?python_provide:%python_provide python-azure-mgmt-authorization} %{?python_provide:%python_provide python2-azure-mgmt-authorization} %{?python_provide:%python_provide python-azure-mgmt-batch} %{?python_provide:%python_provide python2-azure-mgmt-batch} %{?python_provide:%python_provide python-azure-mgmt-cdn} %{?python_provide:%python_provide python2-azure-mgmt-cdn} %{?python_provide:%python_provide python-azure-mgmt-cognitiveservices} %{?python_provide:%python_provide python2-azure-mgmt-cognitiveservices} %{?python_provide:%python_provide python-azure-mgmt-commerce} %{?python_provide:%python_provide python2-azure-mgmt-commerce} %{?python_provide:%python_provide python-azure-mgmt-compute} %{?python_provide:%python_provide python2-azure-mgmt-compute} %{?python_provide:%python_provide python-azure-mgmt-dns} %{?python_provide:%python_provide python2-azure-mgmt-dns} %{?python_provide:%python_provide python-azure-mgmt-iothub} %{?python_provide:%python_provide python2-azure-mgmt-iothub} %{?python_provide:%python_provide python-azure-mgmt-keyvault} %{?python_provide:%python_provide python2-azure-mgmt-keyvault} %{?python_provide:%python_provide python-azure-mgmt-logic} %{?python_provide:%python_provide python2-azure-mgmt-logic} %{?python_provide:%python_provide python-azure-mgmt-network} %{?python_provide:%python_provide python2-azure-mgmt-network} %{?python_provide:%python_provide python-azure-mgmt-notificationhubs} %{?python_provide:%python_provide python2-azure-mgmt-notificationhubs} %{?python_provide:%python_provide python-azure-mgmt-nspkg} %{?python_provide:%python_provide python2-azure-mgmt-nspkg} %{?python_provide:%python_provide python-azure-mgmt-powerbiembedded} %{?python_provide:%python_provide python2-azure-mgmt-powerbiembedded} %{?python_provide:%python_provide python-azure-mgmt-redis} %{?python_provide:%python_provide python2-azure-mgmt-redis} %{?python_provide:%python_provide python-azure-mgmt-resource} %{?python_provide:%python_provide python2-azure-mgmt-resource} %{?python_provide:%python_provide python-azure-mgmt-scheduler} %{?python_provide:%python_provide python2-azure-mgmt-scheduler} %{?python_provide:%python_provide python-azure-mgmt-storage} %{?python_provide:%python_provide python2-azure-mgmt-storage} %{?python_provide:%python_provide python-azure-mgmt-trafficmanager} %{?python_provide:%python_provide python2-azure-mgmt-trafficmanager} %{?python_provide:%python_provide python-azure-mgmt-web} %{?python_provide:%python_provide python2-azure-mgmt-web} %{?python_provide:%python_provide python-azure-nspkg} %{?python_provide:%python_provide python2-azure-nspkg} %{?python_provide:%python_provide python-azure-servicebus} %{?python_provide:%python_provide python2-azure-servicebus} %{?python_provide:%python_provide python-azure-servicemanagement-legacy} %{?python_provide:%python_provide python2-azure-servicemanagement-legacy} %description -n python2-%{python_module} %{common_description} %if 0%{?_with_python3} %package -n python3-%{python_module} Summary: %{common_summary} Requires: python3-msrest >= 0.4.0 Requires: python3-msrestazure >= 0.4.0 Requires: python3-pyOpenSSL Requires: python3-requests %{?python_provide:%python_provide python3-%{python_module}} # Set Provides for each module bundled in the SDK %{?python_provide:%python_provide python3-azure} %{?python_provide:%python_provide python3-azure-batch} %{?python_provide:%python_provide python3-azure-common} %{?python_provide:%python_provide python3-azure-graphrbac} %{?python_provide:%python_provide python3-azure-mgmt} %{?python_provide:%python_provide python3-azure-mgmt-authorization} %{?python_provide:%python_provide python3-azure-mgmt-batch} %{?python_provide:%python_provide python3-azure-mgmt-cdn} %{?python_provide:%python_provide python3-azure-mgmt-cognitiveservices} %{?python_provide:%python_provide python3-azure-mgmt-commerce} %{?python_provide:%python_provide python3-azure-mgmt-compute} %{?python_provide:%python_provide python3-azure-mgmt-dns} %{?python_provide:%python_provide python3-azure-mgmt-iothub} %{?python_provide:%python_provide python3-azure-mgmt-keyvault} %{?python_provide:%python_provide python3-azure-mgmt-logic} %{?python_provide:%python_provide python3-azure-mgmt-network} %{?python_provide:%python_provide python3-azure-mgmt-notificationhubs} %{?python_provide:%python_provide python3-azure-mgmt-nspkg} %{?python_provide:%python_provide python3-azure-mgmt-powerbiembedded} %{?python_provide:%python_provide python3-azure-mgmt-redis} %{?python_provide:%python_provide python3-azure-mgmt-resource} %{?python_provide:%python_provide python3-azure-mgmt-scheduler} %{?python_provide:%python_provide python3-azure-mgmt-storage} %{?python_provide:%python_provide python3-azure-mgmt-trafficmanager} %{?python_provide:%python_provide python3-azure-mgmt-web} %{?python_provide:%python_provide python3-azure-nspkg} %{?python_provide:%python_provide python3-azure-servicebus} %{?python_provide:%python_provide python3-azure-servicemanagement-legacy} %description -n python3-%{python_module} %{common_description} %endif %prep %setup -q -n %{alt_name}-%{version}%{?prerelease} %patch0 -p0 -b .tests # Disable tests requiring a valid Azure subscription rm azure-mgmt/tests/{test_mgmt_network.py,test_mgmt_resource.py} # Disable tests requiring python-azure-storage # TODO: once the python-azure-storage package available, re-enable it rm azure-servicemanagement-legacy/tests/test_legacy_mgmt_misc.py %build %py2_build %{?_with_python3:%py3_build} # Build documentation make -C doc/ html %install %py2_install %if 0%{?_with_python3} %py3_install %endif rm doc/_build/html/.buildinfo %check %if 0%{?_with_tests} %{__python2} azure_nosetests.py %{?_with_python3:%{__python3} azure_nosetests.py} %endif %files -n python2-%{python_module} %doc ChangeLog.rst HOWTO.txt README.rst doc/_build/html/ %license LICENSE.txt %{python2_sitelib}/* %if 0%{?_with_python3} %files -n python3-%{python_module} %doc ChangeLog.rst HOWTO.txt README.rst doc/_build/html/ %license LICENSE.txt %{python3_sitelib}/* %endif %changelog * Tue Sep 27 2016 Mohamed El Morabity - 2.0.0-0.8.rc6 - Update to 2.0.0rc6 * Thu Jul 21 2016 Mohamed El Morabity - 2.0.0-0.7.rc5 - Update to 2.0.0rc5 - Build documentation - Run tests at build * Thu May 26 2016 Mohamed El Morabity - 2.0.0-0.6.rc4 - Update to 2.0.0rc4 * Sun May 01 2016 Mohamed El Morabity - 2.0.0-0.5.rc3 - Update to 2.0.0rc3 * Mon Apr 11 2016 Mohamed El Morabity - 2.0.0-0.4.rc2 - Update to 2.0.0rc2 * Fri Mar 25 2016 Mohamed El Morabity - 2.0.0-0.3.rc1 - Add missing dependency to enum34 Python module * Sat Mar 05 2016 Mohamed El Morabity - 2.0.0-0.2.rc1 - Update to 2.0.0rc1 * Mon Feb 29 2016 Mohamed El Morabity - 2.0.0-0.1.a1 - Update to 2.0.0a1 - Improve macros for Python 3 subpackage * Mon Feb 08 2016 Mohamed El Morabity - 1.0.3-1 - Update to 1.0.3 * Sun Jan 10 2016 Mohamed El Morabity - 1.0.2-1 - Initial RPM release