From ec19a5a7c8734886e0a43ed341b801c8d984d0298ef8518fe663c6526127d076 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 4 Oct 2017 11:54:18 +0000 Subject: [PATCH] - Add namespace packages to BuildRequires - Remove namespace files in %install target - Explicitly specify Python files of the package in %files OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/azure-cli-core?expand=0&rev=4 --- azure-cli-core.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/azure-cli-core.spec b/azure-cli-core.spec index 8c7e56d..8ba3045 100644 --- a/azure-cli-core.spec +++ b/azure-cli-core.spec @@ -27,6 +27,8 @@ Source1: LICENSE.txt BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: unzip +BuildRequires: azure-cli-nspkg +BuildRequires: python3-azure-nspkg Requires: azure-cli-nspkg Requires: python3-azure-nspkg Requires: python3-adal >= 0.4.3 @@ -63,14 +65,14 @@ python3 setup.py build %install python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} +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__ %files %defattr(-,root,root,-) %doc LICENSE.txt README.rst -%exclude %{python3_sitelib}/azure/cli/__init__.*py* -%exclude %{python3_sitelib}/azure/cli/__pycache__/__init__.*py* -%exclude %{python3_sitelib}/azure/__init__.*py* -%exclude %{python3_sitelib}/azure/__pycache__/__init__.*py* -%{python3_sitelib}/* - +%{python3_sitelib}/azure/cli/core +%{python3_sitelib}/azure_cli_core-*.egg-info %changelog