# # spec file for package azure-cli # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # Define just "test" as a package in _multibuild file to distinguish test # instructions here %if "@BUILD_FLAVOR@" == "" %define _test 0 %define name_ext %nil %else %define _test 1 %define name_ext -test %endif %if !%{?_test} Name: azure-cli %else Name: azure-cli%{?name_ext} %endif %define short_name azure-cli Version: 2.0.45 Release: 0 Summary: Microsoft Azure CLI 2.0 License: MIT Group: System/Management Url: https://github.com/Azure/azure-cli Source: https://files.pythonhosted.org/packages/source/a/azure-cli/azure-cli-%{version}.tar.gz Source1: LICENSE.txt Patch1: ac_use-python3-by-default.patch %if 0%{?_test} BuildRequires: %{short_name} = %{version} %else BuildRequires: azure-cli-nspkg BuildRequires: python3-azure-nspkg BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: unzip Requires: azure-cli-acr Requires: azure-cli-acs Requires: azure-cli-advisor Requires: azure-cli-ams Requires: azure-cli-appservice Requires: azure-cli-backup Requires: azure-cli-batch Requires: azure-cli-batchai Requires: azure-cli-billing Requires: azure-cli-cdn Requires: azure-cli-cloud Requires: azure-cli-cognitiveservices Requires: azure-cli-command-modules-nspkg Requires: azure-cli-component Requires: azure-cli-configure Requires: azure-cli-consumption Requires: azure-cli-container Requires: azure-cli-core Requires: azure-cli-cosmosdb Requires: azure-cli-dla Requires: azure-cli-dls Requires: azure-cli-dms Requires: azure-cli-eventgrid Requires: azure-cli-eventhubs Requires: azure-cli-extension Requires: azure-cli-feedback Requires: azure-cli-find Requires: azure-cli-interactive Requires: azure-cli-iot Requires: azure-cli-keyvault Requires: azure-cli-lab Requires: azure-cli-monitor Requires: azure-cli-network Requires: azure-cli-nspkg Requires: azure-cli-profile Requires: azure-cli-rdbms Requires: azure-cli-redis Requires: azure-cli-reservations Requires: azure-cli-resource Requires: azure-cli-role Requires: azure-cli-search Requires: azure-cli-servicebus Requires: azure-cli-servicefabric Requires: azure-cli-sql Requires: azure-cli-storage Requires: azure-cli-taskhelp Requires: azure-cli-telemetry Requires: azure-cli-vm Requires: python3-azure-nspkg Conflicts: azure-cli < 2.0.0 BuildArch: noarch %endif %description Microsoft Azure CLI 2.0 Command Line Utilities %prep %if 0%{?_test} # workaround to prevent post/install failing assuming this file for whatever # reason touch %{_sourcedir}/%{short_name} %else %setup -q -n azure-cli-%{version} %patch1 -p1 %endif %build %if 0%{?_test} az --help %else install -m 644 %{SOURCE1} %{_builddir}/azure-cli-%{version} python3 setup.py build %endif %install %if 0%{?_test} # disable debug packages in package test to prevent error about missing files %define debug_package %{nil} %else python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} install -DTm644 %{buildroot}%{_bindir}/az.completion.sh %{buildroot}/etc/bash_completion.d/az.completion.sh rm -rf %{buildroot}%{python3_sitelib}/azure/cli/__init__.* rm -rf %{buildroot}%{python3_sitelib}/azure/cli/__pycache__ rm -rf %{buildroot}%{python3_sitelib}/azure/__init__.* rm -rf %{buildroot}%{python3_sitelib}/azure/__pycache__ %endif %files %if !%{?_test} %defattr(-,root,root,-) %doc HISTORY.rst README.rst %license LICENSE.txt %{_bindir}/az %config /etc/bash_completion.d/az.completion.sh %exclude /usr/bin/az.bat %exclude /usr/bin/az.completion.sh %{python3_sitelib}/azure/cli %{python3_sitelib}/azure_cli-*.egg-info %endif %changelog