From 94e675e5d415297f29bacf65b90535af5ad986fc Mon Sep 17 00:00:00 2001 From: sean-lau Date: Fri, 7 May 2021 15:49:48 +0800 Subject: [PATCH] Add package for OpenStack R and Q support --- google-api-python-client.spec | 69 ------------------------ python-google-api-python-client.spec | 79 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 69 deletions(-) delete mode 100644 google-api-python-client.spec create mode 100644 python-google-api-python-client.spec diff --git a/google-api-python-client.spec b/google-api-python-client.spec deleted file mode 100644 index 218140e..0000000 --- a/google-api-python-client.spec +++ /dev/null @@ -1,69 +0,0 @@ -# Share doc between python- and python3- -%global _docdir_fmt %{name} -%global sum Google APIs Client Library for Python -%global srcname google-api-client - -Name: google-api-python-client -Summary: %{sum} -Epoch: 1 -Version: 1.6.7 -Release: 11 - -License: ASL 2.0 -URL: http://github.com/google/%{name}/ -Source0: https://files.pythonhosted.org/packages/e0/91/0e6a42ea3e0898a75d819a9690c8c8d0eecd31275d8a85503c8fc33949f2/%{name}-%{version}.tar.gz -BuildArch: noarch - -%description -Written by Google, this library provides a small, flexible, and powerful -Python client library for accessing Google APIs. - -%package -n python3-%{srcname} -Summary: %{sum} -%{?python_provide:%python_provide python3-%{srcname}} - -BuildRequires: python3-devel >= 3.3 -BuildRequires: python3-setuptools -BuildRequires: python3-httplib2 >= 0.9.2 -BuildRequires: python3-oauth2client >= 2.0.0 -BuildRequires: python3-uritemplate >= 3.0.0 -BuildRequires: python3-six >= 1.6.1 - -Requires: python3-httplib2 >= 0.9.2 -Requires: python3-oauth2client >= 2.0.0 -Requires: python3-uritemplate >= 3.0.0 -Requires: python3-six >= 1.6.1 - -%description -n python3-%{srcname} -Written by Google, this library provides a small, flexible, and powerful -Python 3 client library for accessing Google APIs. - -%prep -%setup -q - -# remove egg info -rm -rf google_api_python_client.egg-info - -# remove shebang without touching timestamp -for lib in googleapiclient/*.py; do - sed '1{\@^#!/usr/bin/python@d}' $lib > $lib.new && - touch -r $lib $lib.new && - mv $lib.new $lib -done - -%build -%{py3_build} - -%install -%{py3_install} - -%files -n python3-%{srcname} -%license LICENSE -%doc CHANGELOG -%{python3_sitelib}/apiclient/ -%{python3_sitelib}/googleapiclient/ -%{python3_sitelib}/google_api_python_client-%{version}-py%{python3_version}.egg-info/ - -%changelog -* Fri Oct 30 2020 jiangxinyu - 1:1.6.7-11 -- Init google-api-python-client project diff --git a/python-google-api-python-client.spec b/python-google-api-python-client.spec new file mode 100644 index 0000000..69d46b0 --- /dev/null +++ b/python-google-api-python-client.spec @@ -0,0 +1,79 @@ +%global _empty_manifest_terminate_build 0 +Name: python-google-api-python-client +Version: 1.6.7 +Release: 1 +Summary: Google API Client Library for Python +License: Apache-2.0 +URL: http://github.com/google/google-api-python-client/ +Source0: https://files.pythonhosted.org/packages/e4/ae/67420c05e476c73ed871e5e01cffb4cff570810618422e20c0f80e543ea5/google-api-python-client-1.6.7.tar.gz +BuildArch: noarch +%description +The Google API Client for Python is a client library for +accessing the Plus, Moderator, and many other Google APIs. + + +%package -n python2-google-api-python-client +Summary: Google API Client Library for Python +Provides: python-google-api-python-client +BuildRequires: python2-devel +BuildRequires: python2-setuptools +Requires: python2-httplib2 +Requires: python2-oauth2client +Requires: python2-six +Requires: python2-uritemplate +%description -n python2-google-api-python-client +The Google API Client for Python is a client library for +accessing the Plus, Moderator, and many other Google APIs. + + +%package help +Summary: Development documents and examples for google-api-python-client +Provides: python2-google-api-python-client-doc +%description help +The Google API Client for Python is a client library for +accessing the Plus, Moderator, and many other Google APIs. + + +%prep +%autosetup -n google-api-python-client-1.6.7 + +%build +%py2_build + +%install +%py2_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python2-google-api-python-client -f filelist.lst +%dir %{python2_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 07 2021 OpenStack_SIG +- Package Spec generated -- Gitee