python-influxdb/python-influxdb.spec

87 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-influxdb
#
# Copyright (c) 2022 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/
#
%define skip_python2 1
%define skip_python36 1
Name: python-influxdb
Version: 5.3.1
Release: 0
Summary: InfluxDB client
License: MIT
Group: Development/Languages/Python
URL: https://github.com/influxdb/influxdb-python
Source: https://files.pythonhosted.org/packages/source/i/influxdb/influxdb-%{version}.tar.gz
# https://github.com/influxdata/influxdb-python/pull/835
Patch0: python-influxdb-remove-nose.patch
# PATCH-FIX-UPSTREAM influxdb-pr845-pandas-future.patch -- gh#influxdb/influxdb-python#845
Patch1: https://github.com/influxdata/influxdb-python/pull/845.patch#/influxdb-pr845-pandas-future.patch
BuildRequires: %{python_module python-dateutil >= 2.6.0}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module requests >= 2.17.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.10.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Accepting request 793877 from home:mcalabkova:branches:devel:languages:python - Update to 5.3.0 * Add mypy testing framework (#756) * Add support for messagepack (#734 thx @lovasoa) * Add support for 'show series' (#357 thx @gaker) * Add support for custom request session in InfluxDBClient (#360 thx @dschien) * Add support for handling np.nan and np.inf values in DataFrameClient (#436 thx @nmerket) * Add support for optional `time_precision` in the SeriesHelper (#502 && #719 thx @appunni-dishq && @klDen) * Add ability to specify retention policy in SeriesHelper (#723 thx @csanz91) * Add gzip compression for post and response data (#732 thx @KEClaytor) * Add support for chunked responses in ResultSet (#753 and #538 thx @hrbonz && @psy0rz) * Add support for empty string fields (#766 thx @gregschrock) * Add support for context managers to InfluxDBClient (#721 thx @JustusAdam) * Clean up stale CI config (#755) * Add legacy client test (#752 & #318 thx @oldmantaiter & @sebito91) * Update make_lines section in line_protocol.py to split out core function (#375 thx @aisbaa) * Fix nanosecond time resolution for points (#407 thx @AndreCAndersen && @clslgrnc) * Fix import of distutils.spawn (#805 thx @Hawk777) * Update repr of float values including properly handling of boolean (#488 thx @ghost) * Update DataFrameClient to fix faulty empty tags (#770 thx @michelfripiat) * Update DataFrameClient to properly return `dropna` values (#778 thx @jgspiro) * Update DataFrameClient to test for pd.DataTimeIndex before blind conversion (#623 thx @testforvin) * Update client to type-set UDP port to int (#651 thx @yifeikong) * Update batched writing support for all iterables (#746 thx @JayH5) * Update SeriesHelper to enable class instantiation when not initialized (#772 thx @ocworld) * Update UDP test case to add proper timestamp to datapoints (#808 thx @shantanoo-desai) - Drop upstreamed patch python-influxdb-fix-testsuite.patch OBS-URL: https://build.opensuse.org/request/show/793877 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-influxdb?expand=0&rev=22
2020-04-14 13:08:18 +00:00
Requires: python-msgpack
Requires: python-python-dateutil >= 2.6.0
Requires: python-pytz
Requires: python-requests >= 2.17.0
Requires: python-six >= 1.10.0
ExcludeArch: %ix86 %arm ppc
# SECTION test requirements
Accepting request 793877 from home:mcalabkova:branches:devel:languages:python - Update to 5.3.0 * Add mypy testing framework (#756) * Add support for messagepack (#734 thx @lovasoa) * Add support for 'show series' (#357 thx @gaker) * Add support for custom request session in InfluxDBClient (#360 thx @dschien) * Add support for handling np.nan and np.inf values in DataFrameClient (#436 thx @nmerket) * Add support for optional `time_precision` in the SeriesHelper (#502 && #719 thx @appunni-dishq && @klDen) * Add ability to specify retention policy in SeriesHelper (#723 thx @csanz91) * Add gzip compression for post and response data (#732 thx @KEClaytor) * Add support for chunked responses in ResultSet (#753 and #538 thx @hrbonz && @psy0rz) * Add support for empty string fields (#766 thx @gregschrock) * Add support for context managers to InfluxDBClient (#721 thx @JustusAdam) * Clean up stale CI config (#755) * Add legacy client test (#752 & #318 thx @oldmantaiter & @sebito91) * Update make_lines section in line_protocol.py to split out core function (#375 thx @aisbaa) * Fix nanosecond time resolution for points (#407 thx @AndreCAndersen && @clslgrnc) * Fix import of distutils.spawn (#805 thx @Hawk777) * Update repr of float values including properly handling of boolean (#488 thx @ghost) * Update DataFrameClient to fix faulty empty tags (#770 thx @michelfripiat) * Update DataFrameClient to properly return `dropna` values (#778 thx @jgspiro) * Update DataFrameClient to test for pd.DataTimeIndex before blind conversion (#623 thx @testforvin) * Update client to type-set UDP port to int (#651 thx @yifeikong) * Update batched writing support for all iterables (#746 thx @JayH5) * Update SeriesHelper to enable class instantiation when not initialized (#772 thx @ocworld) * Update UDP test case to add proper timestamp to datapoints (#808 thx @shantanoo-desai) - Drop upstreamed patch python-influxdb-fix-testsuite.patch OBS-URL: https://build.opensuse.org/request/show/793877 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-influxdb?expand=0&rev=22
2020-04-14 13:08:18 +00:00
BuildRequires: %{python_module msgpack}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests-mock}
BuildRequires: influxdb
%if 0%{?suse_version} >= 1500
BuildRequires: hostname
%endif
# /SECTION
%python_subpackages
%description
InfluxDB-Python is a client for interacting with InfluxDB 1.x
%prep
%autosetup -p1 -n influxdb-%{version}
# remove extra mock
sed -e 's/^import mock/from unittest import mock/' \
-e 's/^from mock import/from unittest.mock import/' \
-i influxdb/tests/*.py influxdb/tests/*/*.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/influxdata/influxdb-python/issues/884
donttest="test_write_points_from_dataframe_with_nan_json or test_write_points_from_dataframe_with_tags_and_nan_json"
%pytest influxdb -k "not ($donttest)"
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/influxdb
%{python_sitelib}/influxdb-%{version}*-info
%changelog