Skip to content

Commit

Permalink
Update python-influxdb-client to version 1.41.0 / rev 1 via SR 1155204
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1155204
by user bnavigator + dimstar_suse
inflxudb1 is old and does not support Python 3.12, New client lib required for a migration of openSUSE-release-tools metrics to influxdb2 openSUSE/openSUSE-release-tools#3034
  • Loading branch information
bnavigator authored and bmwiedemann committed Mar 6, 2024
1 parent 70a389f commit 7d7e472
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
Binary file added packages/p/python-influxdb-client/.files
Binary file not shown.
5 changes: 5 additions & 0 deletions packages/p/python-influxdb-client/.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<package name="python-influxdb-client" project="openSUSE:Factory">
<title></title>
<description></description>
<devel project="server:database" package="python-influxdb-client"/>
</package>
10 changes: 10 additions & 0 deletions packages/p/python-influxdb-client/.rev
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<revisionlist>
<revision rev="1" vrev="1">
<srcmd5>34af2b8ff4fea9ea2aba8824cdb95330</srcmd5>
<version>1.41.0</version>
<time>1709762657</time>
<user>dimstar_suse</user>
<comment>inflxudb1 is old and does not support Python 3.12, New client lib required for a migration of openSUSE-release-tools metrics to influxdb2 https://github.com/openSUSE/openSUSE-release-tools/issues/3034</comment>
<requestid>1155204</requestid>
</revision>
</revisionlist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sun Mar 3 11:45:45 UTC 2024 - Ben Greiner <[email protected]>

- Initial specfile for v1.41.0
110 changes: 110 additions & 0 deletions packages/p/python-influxdb-client/python-influxdb-client.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#
# spec file for package python-influxdb-client
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#


Name: python-influxdb-client
Version: 1.41.0
Release: 0
Summary: InfluxDB 2.0 Python client library
License: MIT
URL: https://github.com/influxdata/influxdb-client-python
Source: https://github.com/influxdata/influxdb-client-python/archive/refs/tags/v%{version}.tar.gz#/influxdb_client-%{version}-gh.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-certifi >= 14.05.14
Requires: python-python-dateutil >= 2.5.3
Requires: python-reactivex >= 4.0.4
Requires: python-setuptools >= 21.0.0
Requires: python-urllib3 >= 1.26.0
Suggests: python-aiocsv >= 1.2.2
Suggests: python-aiohttp >= 3.8.1
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module aiocsv >= 1.2.2}
BuildRequires: %{python_module aiohttp >= 3.8.1}
BuildRequires: %{python_module aioresponses >= 0.7.3}
BuildRequires: %{python_module certifi >= 14.05.14}
BuildRequires: %{python_module httpretty >= 1.0.5}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pluggy >= 0.3.1}
BuildRequires: %{python_module psutil >= 5.6.3}
BuildRequires: %{python_module py >= 1.4.31}
BuildRequires: %{python_module pytest >= 5.0.0}
BuildRequires: %{python_module pytest-timeout >= 2.1.0}
BuildRequires: %{python_module python-dateutil >= 2.5.3}
BuildRequires: %{python_module reactivex >= 4.0.4}
BuildRequires: %{python_module urllib3 >= 1.26.0}
BuildRequires: curl
BuildRequires: influxdb2
# /SECTION
%python_subpackages

%description
The Python client library for use with InfluxDB 2.x and Flux.
InfluxDB 3.x users should instead use the lightweight v3 client library.
InfluxDB 1.x users should use the v1 client library.

The API of the influxdb-client-python is not the backwards-compatible with
the old one - influxdb-python.

%prep
%autosetup -p1 -n influxdb-client-python-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
# setup local influxdb server
export INFLUXD_HTTP_BIND_ADDRESS=":8086"
influxd &
trap "kill $! || true" EXIT
sleep 2
curl -i -X POST http://localhost:8086/api/v2/setup -H 'accept: application/json' \
-d '{
"username": "my-user",
"password": "my-password",
"org": "my-org",
"bucket": "my-bucket",
"token": "my-token"
}'
# /setup
# double requests found. This may be due to our custom test setup without docker container
donttest="(InfluxDBClientTestMock and test_redacted_auth_header)"
donttest="$donttest or (BucketsClientTest and test_pagination)"
donttest="$donttest or (WriteApiTestMock and test_data_class)"
donttest="$donttest or (WriteApiTestMock and test_named_tuple)"
donttest="$donttest or (WriteApiTestMock and test_redirect)"
donttest="$donttest or (WriteApiTestMock and test_writes_asynchronous_without_retry)"
donttest="$donttest or (WriteApiTestMock and test_writes_default_tags_dict_without_tag)"
donttest="$donttest or (WriteApiTestMock and test_writes_synchronous_without_retry)"
donttest="$donttest or BatchingWriteTest"
donttest="$donttest or test_gzip"
donttest="$donttest or test_query_and_debug"
%pytest tests -k "not ($donttest)"

%files %{python_files}
%{python_sitelib}/influxdb_client
%{python_sitelib}/influxdb_client-%{version}.dist-info

%changelog

0 comments on commit 7d7e472

Please sign in to comment.