File google-cloud-sdk.spec of Package google-cloud-sdk

#
# spec file for package google-cloud-sdk
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#


Name:           google-cloud-sdk
Version:        0.9.25
Release:        0
Summary:        Tools for Google Cloud Services
License:        Apache-2.0
Group:          System/Management
Url:            https://dl.google.com/dl/cloudsdk/release
Source0:        %{name}-%{version}.tar.bz2
Source1:        setup.py
Patch1:         gsutilHideDeps.patch
Patch2:         gcutilHideDeps.patch
Patch3:         gsutilSupportBotoCfgKeyword.patch
Patch4:         gcutilNoInternalVersionCheck.patch
Patch5:         bqHideDeps.patch
Patch6:         gcloudFixPath.patch
Patch7:         hideImplicitVersionMgmt.patch
Requires:       google-api-python-client => 1.2
Requires:       python
Requires:       python-SocksiPy
Requires:       python-argcomplete
Requires:       python-argparse
Requires:       python-boto
Requires:       python-crcmod
Requires:       python-docker-py
Requires:       python-google-apputils
Requires:       python-httplib2          => 0.8
Requires:       python-ipaddr
Requires:       python-iso8601
Requires:       python-python-gflags
Requires:       python-python-mimeparse
Requires:       python-requests
Requires:       python-retry_decorator
Requires:       python-setuptools
Requires:       python-six
Requires:       python-uritemplate
Requires:       python-websocket-client
Requires:       python-yaml
Provides:       gcutils > 1.13.0
Provides:       gsutils > 3.42
Obsoletes:      gcutils <= 1.13.0
Obsoletes:      gsutils <= 3.42
BuildRequires:  python-setuptools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
Google Cloud SDK contains tools and libraries that allow you to create and
manage resources on Google Cloud Platform, including App Engine, Compute
Engine, Cloud Storage, Cloud SQL, and BigQuery.

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5
%patch6
%patch7

cp %{SOURCE1} %{_builddir}/%{name}-%{version}

%build
python setup.py build
pushd platform/gsutil
python setup.py build
popd
pushd platform/gcutil
python setup.py build
popd
pushd platform/bq
python setup.py build
popd

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
pushd platform/gsutil
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
pushd platform/gcutil
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
pushd platform/bq
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd

%files
%defattr(-,root,root,-)
%doc LICENSE README RELEASE_NOTES
# gcloud stuff
%dir %{python_sitelib}/google
%dir %{python_sitelib}/googlecloudapis
%dir %{python_sitelib}/googlecloudsdk
%dir %{python_sitelib}/google_cloud_sdk-%{version}-py%{py_ver}.egg-info
%{_bindir}/gcloud
%{python_sitelib}/google/*
%{python_sitelib}/googlecloudapis/*
%{python_sitelib}/googlecloudsdk/*
%{python_sitelib}/*egg-info/*
# integrated gsutil
%dir %{python_sitelib}/gslib
%dir %{python_sitelib}/gslib/addlhelp
%dir %{python_sitelib}/gslib/commands
%dir %{python_sitelib}/gslib/data
%dir %{python_sitelib}/gslib/third_party
%dir %{python_sitelib}/gslib/tests
%dir %{python_sitelib}/gsutil-3.42-py%{py_ver}.egg-info
%doc %{python_sitelib}/gslib/CHECKSUM
%doc %{python_sitelib}/gslib/README
%doc %{python_sitelib}/gslib/VERSION
%{python_sitelib}/gslib/addlhelp/*
%{python_sitelib}/gslib/commands/*
%{python_sitelib}/gslib/data/*
%{python_sitelib}/gslib/third_party/*
%{python_sitelib}/gslib/tests/*
%{python_sitelib}/gslib/*.py*
%{_bindir}/gsutil
# integrated gcutil
%dir %{python_sitelib}/gcutil_lib
%dir %{python_sitelib}/gcutil_lib/compute
%dir %{python_sitelib}/gcutil_lib/table
%dir %{python_sitelib}/gcutil-1.15.0-py%{py_ver}.egg-info
%{python_sitelib}/gcutil_lib/*
%{_bindir}/gcutil
# integrated bq
%dir %{python_sitelib}/discovery
%dir %{python_sitelib}/bigquery-2.0.18-py%{py_ver}.egg-info
%{python_sitelib}/discovery/*
%{python_sitelib}/bigquery_client.*
%{python_sitelib}/bq.*
%{python_sitelib}/table_formatter.*
%{_bindir}/bq
# built in dependency on protorpc, not available as stand alone code stream
%dir %{python_sitelib}/protorpc
%dir %{python_sitelib}/protorpc/webapp
%dir %{python_sitelib}/protorpc/wsgi
%{python_sitelib}/protorpc/*

%changelog