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

Name:           google-cloud-sdk
Version:        0.9.25
Release:        0
Summary:        Tools for Google Cloud Services
License:        Apache-2.0
Group:          System/Management
Source0:        %{name}-%{version}.tar.bz2
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()")}
BuildArch:      noarch

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.

%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

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

python build
pushd platform/gsutil
python build
pushd platform/gcutil
python build
pushd platform/bq
python build

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

# 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
# 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
# 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
# integrated bq
%dir %{python_sitelib}/discovery
%dir %{python_sitelib}/bigquery-2.0.18-py%{py_ver}.egg-info
# 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