* add uuid support (#1310) * handle errors during stream restart in snapshot (#1471) * resolve pre-release dependency failures and sqlparse recursion (#1472) * transaction_tag should be set on BeginTransactionRequest (#1463) - from version 3.61.0 * support mTLS certificates when available (#1467) - from version 3.60.0 * Update description for the BatchCreateSessionsRequest and Session * Update description for the IsolationLevel * make built-in metrics enabled by default (#1459) * Add Spanner location API (#1457) * Add Send and Ack mutations for Queues * Add QueryAdvisorResult for query plan * add cloud.region, request_tag and transaction_tag in span attributes (#1449) * Exposing AutoscalingConfig in InstancePartition * enable OpenTelemetry metrics and tracing by default (#1410) * add support for experimental host (#1452) * Provide Spanner Option to disable metrics (#1460) * Deprecate credentials_file argument * configure keepAlive time for gRPC TCP connections (#1448) - from version 3.59.0 * **spanner:** Add lazy decode to partitioned query (#1411) * **spanner:** Resolve TypeError in metrics resource detection (#1446) * Add snippet for Repeatable Read configuration at client and transaction (#1326) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:google/python-google-cloud-spanner?expand=0&rev=18
118 lines
4.0 KiB
RPMSpec
118 lines
4.0 KiB
RPMSpec
#
|
|
# spec file for package python-google-cloud-spanner
|
|
#
|
|
# Copyright (c) 2026 SUSE LLC and contributors
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without test
|
|
%else
|
|
%define psuffix %{nil}
|
|
%bcond_with test
|
|
%endif
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-google-cloud-spanner%{psuffix}
|
|
Version: 3.62.0
|
|
Release: 0
|
|
Summary: Google Cloud Spanner API client library
|
|
License: Apache-2.0
|
|
URL: https://github.com/googleapis/python-spanner
|
|
Source: https://files.pythonhosted.org/packages/source/g/google_cloud_spanner/google_cloud_spanner-%{version}.tar.gz
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
%if %{with test}
|
|
BuildRequires: %{python_module google-cloud-monitoring >= 2.16.0}
|
|
BuildRequires: %{python_module google-cloud-spanner = %{version}}
|
|
BuildRequires: %{python_module mmh3 >= 4.1.0}
|
|
BuildRequires: %{python_module opentelemetry-api >= 1.22.0}
|
|
BuildRequires: %{python_module opentelemetry-resourcedetector-gcp >= 1.8.0a0}
|
|
BuildRequires: %{python_module opentelemetry-sdk >= 1.22.0}
|
|
BuildRequires: %{python_module opentelemetry-semantic-conventions >= 0.43b0}
|
|
BuildRequires: %{python_module pytest-asyncio}
|
|
BuildRequires: %{python_module pytest}
|
|
%endif
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-google-api-core >= 1.34.0
|
|
Requires: python-google-cloud-core >= 1.4.4
|
|
Requires: python-grpc-google-iam-v1 >= 0.12.4
|
|
Requires: python-grpc-interceptor >= 0.15.4
|
|
Requires: python-proto-plus >= 1.22.0
|
|
Requires: python-protobuf >= 3.20.2
|
|
Requires: python-sqlparse >= 0.4.4
|
|
Suggests: python-google-cloud-monitoring >= 2.16.0
|
|
Suggests: python-mmh3 >= 4.1.0
|
|
Suggests: python-libcst >= 0.2.5
|
|
Suggests: python-opentelemetry-api >= 1.22.0
|
|
Suggests: python-opentelemetry-sdk >= 1.22.0
|
|
Suggests: python-opentelemetry-semantic-conventions >= 0.43b0
|
|
Suggests: python-opentelemetry-resourcedetector-gcp >= 1.8.0a0
|
|
Suggests: python-opentelemetry-instrumentation >= 0.20b0
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Google Cloud Spanner API client library
|
|
|
|
%prep
|
|
%autosetup -p1 -n google_cloud_spanner-%{version}
|
|
|
|
# don't use python-mock
|
|
find . -name "*.py" -exec sed -i "s/^import mock/from unittest import mock/g" {} \;
|
|
find . -name "*.py" -exec sed -i "s/^from mock/from unittest.mock/g" {} \;
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%if %{without test}
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%endif
|
|
|
|
%check
|
|
%if %{with test}
|
|
mkdir -p $HOME/.config/gcloud
|
|
cat > $HOME/.config/gcloud/application_default_credentials.json <<EOF
|
|
{
|
|
"client_id": "111111111111-1qq1q1qq1qqq111qq1qqqq11q1qqqqqq.apps.googleusercontent.com",
|
|
"client_secret": "d-XXXXXXXXXXXXXXXXXXXXXX",
|
|
"refresh_token": "1//1111111111111111111111111111-XXXXXXXXX-AAAAAAAAAAA_BBBBBBBBBBBBBBBBBBBBBB-CCCCCCCCCCCCCCCCCCCCCCCCCC",
|
|
"type": "authorized_user"
|
|
}
|
|
EOF
|
|
export GOOGLE_CLOUD_PROJECT="PROJECT"
|
|
%pytest -x tests/unit
|
|
%endif
|
|
|
|
%if %{without test}
|
|
%files %{python_files}
|
|
%doc README.rst
|
|
%license LICENSE
|
|
%pycache_only %{python_sitelib}/google/cloud/__pycache__
|
|
%dir %{python_sitelib}/google
|
|
%dir %{python_sitelib}/google/cloud
|
|
%{python_sitelib}/google/cloud/spanner*
|
|
%{python_sitelib}/google_cloud_spanner-%{version}.dist-info
|
|
%endif
|
|
|
|
%changelog
|