commit dcccc4ae11d191cd63baddcbc5dfae70f834a04a394df80b034c4bda68bf3b00 Author: Dirk Mueller Date: Tue Mar 5 08:55:17 2024 +0000 Accepting request 1154422 from home:bnavigator:branches:server:database required for async mode in influxdb-client OBS-URL: https://build.opensuse.org/request/show/1154422 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiocsv?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/aiocsv-1.3.1.tar.gz b/aiocsv-1.3.1.tar.gz new file mode 100644 index 0000000..a072917 --- /dev/null +++ b/aiocsv-1.3.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fd2efbb5a327e1e6de5e9d97040e13e86e30420eecffbebb50b399bde4e144e +size 20646 diff --git a/python-aiocsv.changes b/python-aiocsv.changes new file mode 100644 index 0000000..75d91f6 --- /dev/null +++ b/python-aiocsv.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Sun Mar 3 12:39:43 UTC 2024 - Ben Greiner + +- Initial specfile for v1.3.1 required for async mode in + influxdb-client diff --git a/python-aiocsv.spec b/python-aiocsv.spec new file mode 100644 index 0000000..34d514f --- /dev/null +++ b/python-aiocsv.spec @@ -0,0 +1,75 @@ +# +# spec file for package python-aiocsv +# +# 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-aiocsv +Version: 1.3.1 +Release: 0 +Summary: Asynchronous CSV reading/writing in Python +License: MIT +URL: https://github.com/MKuranowski/aiocsv +Source: https://files.pythonhosted.org/packages/source/a/aiocsv/aiocsv-%{version}.tar.gz +BuildRequires: %{python_module aiofiles} +BuildRequires: %{python_module devel >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools >= 61.0} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%python_subpackages + +%description +Asynchronous CSV reading and writing + +AsyncReader & AsyncDictReader accept any object that has a read(size: int) coroutine, +which should return a string. + +AsyncWriter & AsyncDictWriter accept any object that has a write(b: str) coroutine. + +Reading is implemented using a custom CSV parser, which should behave exactly like +the CPython parser. + +Writing is implemented using the synchronous csv.writer and csv.DictWriter objects - +the serializers write data to a StringIO, and that buffer is then rewritten to the +underlying asynchronous file. + +%prep +%autosetup -p1 -n aiocsv-%{version} + +%build +export CFLAGS="%{optflags}" +%pyproject_wheel + +%install +%pyproject_install +%{python_expand # +rm %{buildroot}%{$python_sitearch}/aiocsv/_parser.c +sed -i '/_parser.c/d' %{buildroot}%{$python_sitearch}/aiocsv-%{version}.dist-info/RECORD +%fdupes %{buildroot}%{$python_sitearch} +} + +%check +%pytest_arch + +%files %{python_files} +%doc readme.md +%license LICENSE +%{python_sitearch}/aiocsv +%{python_sitearch}/aiocsv-%{version}.dist-info + +%changelog