2018-09-13 11:20:18 +00:00
|
|
|
|
#
|
2022-06-09 12:41:45 +00:00
|
|
|
|
# spec file
|
2018-09-13 11:20:18 +00:00
|
|
|
|
#
|
2023-01-06 12:20:11 +00:00
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2018-09-13 11:20:18 +00:00
|
|
|
|
#
|
|
|
|
|
# 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 https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2021-04-13 19:31:04 +00:00
|
|
|
|
%define skip_python2 1
|
|
|
|
|
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
|
%define test 1
|
|
|
|
|
%define pkg_suffix -test
|
|
|
|
|
%bcond_without test
|
|
|
|
|
%else
|
|
|
|
|
%define pkg_suffix %{nil}
|
|
|
|
|
%bcond_with test
|
|
|
|
|
%endif
|
|
|
|
|
|
2018-09-13 11:20:18 +00:00
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2022-06-09 12:41:45 +00:00
|
|
|
|
Name: python-google-cloud-storage%{pkg_suffix}
|
2023-03-30 11:13:34 +00:00
|
|
|
|
Version: 2.8.0
|
2018-09-13 11:20:18 +00:00
|
|
|
|
Release: 0
|
2020-04-28 09:30:30 +00:00
|
|
|
|
Summary: Google Cloud Storage API python client library
|
2018-09-13 11:20:18 +00:00
|
|
|
|
License: Apache-2.0
|
2021-06-08 16:56:57 +00:00
|
|
|
|
URL: https://github.com/googleapis/python-storage
|
2018-09-13 11:20:18 +00:00
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/g/google-cloud-storage/google-cloud-storage-%{version}.tar.gz
|
2022-04-16 10:44:23 +00:00
|
|
|
|
# PATCH-FIX-UPSTREAM demock.patch gh#googleapis/python-storage#770 mcepl@suse.com
|
|
|
|
|
# Don’t use external mock package
|
|
|
|
|
Patch1: demock.patch
|
2021-09-30 15:42:39 +00:00
|
|
|
|
BuildRequires: %{python_module pip}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-09-30 15:42:39 +00:00
|
|
|
|
BuildRequires: %{python_module wheel}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2022-04-13 11:43:23 +00:00
|
|
|
|
Requires: python-google-api-core >= 1.31.5
|
|
|
|
|
Requires: python-google-auth >= 1.25.0
|
|
|
|
|
Requires: python-google-cloud-core >= 1.6.0
|
|
|
|
|
Requires: python-google-resumable-media >= 2.3.2
|
2021-06-22 06:36:03 +00:00
|
|
|
|
Requires: python-googleapis-common-protos
|
2021-06-09 15:05:05 +00:00
|
|
|
|
Requires: python-requests >= 2.18.0
|
2018-09-13 11:20:18 +00:00
|
|
|
|
BuildArch: noarch
|
2022-06-09 12:41:45 +00:00
|
|
|
|
# SECTION test requirements
|
|
|
|
|
%if %{with test}
|
|
|
|
|
BuildRequires: %{python_module google-api-core >= 1.31.5}
|
|
|
|
|
BuildRequires: %{python_module google-auth >= 1.25.0}
|
|
|
|
|
BuildRequires: %{python_module google-cloud-core >= 2.3.0}
|
|
|
|
|
BuildRequires: %{python_module google-cloud-storage}
|
|
|
|
|
BuildRequires: %{python_module google-resumable-media >= 2.3.2}
|
|
|
|
|
BuildRequires: %{python_module packaging}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module requests >= 2.18.0}
|
|
|
|
|
%endif
|
|
|
|
|
# /SECTION
|
2018-09-13 11:20:18 +00:00
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2021-06-08 16:56:57 +00:00
|
|
|
|
Google Cloud Storage allows you to store data on Google
|
|
|
|
|
infrastructure with very high reliability, performance and
|
|
|
|
|
availability, and can be used to distribute large data objects
|
|
|
|
|
to users via direct download. This package provides client to it.
|
2018-09-13 11:20:18 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
2021-06-08 16:56:57 +00:00
|
|
|
|
%autosetup -p1 -n google-cloud-storage-%{version}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%if !%{with test}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
%build
|
2021-09-30 15:42:39 +00:00
|
|
|
|
%pyproject_wheel
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%endif
|
2018-09-13 11:20:18 +00:00
|
|
|
|
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%if !%{with test}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
%install
|
2021-09-30 15:42:39 +00:00
|
|
|
|
%pyproject_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%endif
|
2018-09-13 11:20:18 +00:00
|
|
|
|
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%if %{with test}
|
2019-02-18 09:40:20 +00:00
|
|
|
|
%check
|
2022-06-09 12:41:45 +00:00
|
|
|
|
#export PYTEST_ADDOPTS="--import-mode=importlib"
|
2023-01-09 08:06:06 +00:00
|
|
|
|
%pytest -k 'not network and not w_custom_endpoint' tests/unit
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%endif
|
2019-02-18 09:40:20 +00:00
|
|
|
|
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%if !%{with test}
|
2018-09-13 11:20:18 +00:00
|
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%dir %{python_sitelib}/google
|
|
|
|
|
%dir %{python_sitelib}/google/cloud
|
2022-04-23 09:49:41 +00:00
|
|
|
|
%{python_sitelib}/google/cloud/storage
|
|
|
|
|
%{python_sitelib}/google_cloud_storage-%{version}*-info
|
|
|
|
|
%{python_sitelib}/google_cloud_storage-%{version}*-nspkg.pth
|
2022-06-09 12:41:45 +00:00
|
|
|
|
%endif
|
2018-09-13 11:20:18 +00:00
|
|
|
|
|
|
|
|
|
%changelog
|