|
|
f312251 |
# tests are enabled by default
|
|
|
f312251 |
%bcond_without test
|
|
|
1f8d143 |
|
|
|
f312251 |
%global mod_name kafka
|
|
|
f312251 |
%global project_name %{mod_name}-python
|
|
|
f312251 |
%global with_doc 1
|
|
|
f312251 |
|
|
|
f312251 |
Name: python-%{mod_name}
|
|
|
f312251 |
Version: 2.0.2
|
|
|
02f058d |
Release: 14%{?dist}
|
|
|
1f8d143 |
Summary: Pure Python client for Apache Kafka
|
|
|
1f8d143 |
|
|
|
1f8d143 |
License: ASL 2.0
|
|
|
f312251 |
URL: https://github.com/dpkp/%{project_name}
|
|
|
f312251 |
Source0: https://github.com/dpkp/%{project_name}/archive/refs/tags/%{version}.tar.gz
|
|
|
f312251 |
# License file for jslibs using in -doc subpkg
|
|
|
f312251 |
Source1: LICENSE_doc
|
|
|
f312251 |
# This patch is temporary until upstream stops supporting multi-versioned python.
|
|
|
f312251 |
Patch0: test_conn.py.patch
|
|
|
f312251 |
# This patch is temporary until upstream stops supporting multi-versioned python.
|
|
|
f312251 |
Patch1: test_default_records.py.patch
|
|
|
f312251 |
# This patch is temporary until upstream stops supporting multi-versioned python.
|
|
|
f312251 |
Patch2: test_legacy_records.py.patch
|
|
|
f312251 |
# This patch is temporary until upstream releases 2.0.3. See
|
|
|
f312251 |
# https://github.com/dpkp/kafka-python/pull/2123
|
|
|
f312251 |
Patch3: setup.py.patch
|
|
|
e2ad477 |
# This patch is temporary until upstream releases 2.0.3. See
|
|
|
e2ad477 |
# https://github.com/dpkp/kafka-python/pull/2318
|
|
|
e2ad477 |
Patch4: test_assignors.py.patch
|
|
|
28e6479 |
# These patches are temporary until upstream releases 2.0.3. See
|
|
|
28e6479 |
# https://github.com/dpkp/kafka-python/pull/2376
|
|
|
4fd34b3 |
Patch5: kafka_codec.py.patch
|
|
|
4fd34b3 |
Patch6: test_fixture.py.patch
|
|
|
4fd34b3 |
Patch7: test_codec.py.patch
|
|
|
28e6479 |
# This patch is temporary until upstream releases 2.0.3. See
|
|
|
28e6479 |
# https://github.com/dpkp/kafka-python/pull/2375
|
|
|
4fd34b3 |
Patch8: test_client_async.py.patch
|
|
|
1f8d143 |
|
|
|
1f8d143 |
BuildArch: noarch
|
|
|
f312251 |
BuildRequires: pyproject-rpm-macros
|
|
|
f312251 |
BuildRequires: python3-devel
|
|
|
f312251 |
BuildRequires: python3-pip
|
|
|
f312251 |
BuildRequires: python3-wheel
|
|
|
1f8d143 |
|
|
|
1f8d143 |
|
|
|
f312251 |
%if %{with test}
|
|
|
f312251 |
BuildRequires: python3-pytest
|
|
|
f312251 |
BuildRequires: python3-pytest-mock
|
|
|
f312251 |
BuildRequires: python3-snappy
|
|
|
f312251 |
BuildRequires: python3-lz4
|
|
|
f312251 |
BuildRequires: python3-zstandard
|
|
|
f312251 |
BuildRequires: python3-xxhash
|
|
|
f312251 |
%endif
|
|
|
f312251 |
|
|
|
f312251 |
%global _description %{expand:
|
|
|
f312251 |
This module provides low-level protocol support for Apache Kafka as well as
|
|
|
f312251 |
high-level consumer and producer classes. Request batching is supported by the
|
|
|
f312251 |
protocol as well as broker-aware request routing. Gzip and Snappy compression
|
|
|
f312251 |
is also supported for message sets.}
|
|
|
f312251 |
|
|
|
f312251 |
%description %{_description}
|
|
|
f312251 |
|
|
|
f312251 |
%package -n python3-%{mod_name}
|
|
|
f312251 |
Summary: %{summary}
|
|
|
f312251 |
|
|
|
f312251 |
%description -n python3-%{mod_name} %_description
|
|
|
1f8d143 |
|
|
|
1f8d143 |
|
|
|
f312251 |
%if %{with_doc}
|
|
|
f312251 |
%package -n python-%{mod_name}-doc
|
|
|
f312251 |
Summary: Documentation for Pure Python client for Apache Kafka
|
|
|
f312251 |
BuildRequires: make
|
|
|
f312251 |
BuildRequires: python3-sphinx_rtd_theme
|
|
|
f312251 |
# BSD for sphinx. MIT for jquery.js and underscore.js.
|
|
|
f312251 |
License: ASL 2.0 and BSD and MIT
|
|
|
f312251 |
|
|
|
f312251 |
%description -n python-%{mod_name}-doc
|
|
|
f312251 |
Documentation for Pure Python client for Apache Kafka.
|
|
|
f312251 |
%endif
|
|
|
1f8d143 |
|
|
|
1f8d143 |
|
|
|
1f8d143 |
%prep
|
|
|
f312251 |
%autosetup -p0 -n %{project_name}-%{version}
|
|
|
f312251 |
install -m 644 %{SOURCE1} %{_builddir}/%{project_name}-%{version}/LICENSE_doc
|
|
|
f312251 |
|
|
|
f312251 |
%generate_buildrequires
|
|
|
f312251 |
%pyproject_buildrequires -r
|
|
|
1f8d143 |
|
|
|
1f8d143 |
%build
|
|
|
f312251 |
%pyproject_wheel
|
|
|
f312251 |
%if %{with_doc}
|
|
|
f312251 |
%make_build doc
|
|
|
f312251 |
rm -rf docs/_build/html/.buildinfo
|
|
|
f312251 |
%endif
|
|
|
1f8d143 |
|
|
|
f312251 |
%install
|
|
|
f312251 |
%pyproject_install
|
|
|
f312251 |
install -pm 755 kafka/record/_crc32c.py %{buildroot}/%{python3_sitelib}/%{mod_name}/record/_crc32c.py
|
|
|
f312251 |
# Uses the py3_shebang_fix macro manually because pyproject_install macro
|
|
|
f312251 |
# doesn't automatically changes the Python shebangs.
|
|
|
f312251 |
%py3_shebang_fix %{buildroot}/%{python3_sitelib}/%{mod_name}/record/_crc32c.py
|
|
|
f312251 |
%pyproject_save_files %{mod_name}
|
|
|
f312251 |
|
|
|
f312251 |
# Ignores integrational tests requiring network access and tests requiring
|
|
|
f312251 |
# crc32c that is required only for the test and is not packaged in Fedora.
|
|
|
f312251 |
%check
|
|
|
f312251 |
%pytest --ignore="test/test_consumer_integration.py" --ignore="test/record/test_util.py" test
|
|
|
f312251 |
|
|
|
f312251 |
%files -n python3-%{mod_name} -f %{pyproject_files}
|
|
|
f312251 |
%doc AUTHORS.md CHANGES.md README.rst
|
|
|
f312251 |
%license LICENSE
|
|
|
f312251 |
|
|
|
f312251 |
%if %{with_doc}
|
|
|
f312251 |
%files -n python-%{mod_name}-doc
|
|
|
f312251 |
%doc docs/_build/html
|
|
|
f312251 |
%license LICENSE LICENSE_doc
|
|
|
f312251 |
%endif
|
|
|
f312251 |
|
|
|
f312251 |
# LZ4 is an optional compression lib for python-kafka.
|
|
|
f312251 |
# Snappy is an optional compression lib for python-kafka.
|
|
|
f312251 |
%pyproject_extras_subpkg -n python3-kafka lz4 snappy
|
|
|
f312251 |
|
|
|
f312251 |
# ZSTD is an optional compression lib for python-kafka.
|
|
|
f312251 |
# Needs to write the zstd subpackage section manually because
|
|
|
f312251 |
# zstd's extras_requires causes an incorrect dependency.
|
|
|
f312251 |
%package -n python3-%{mod_name}+zstd
|
|
|
f312251 |
Summary: Metapackage for python3-kafka: zstd extras
|
|
|
f312251 |
Requires: python(abi) = %{python3_version}
|
|
|
f312251 |
Requires: python3-kafka = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f312251 |
Requires: python%{python3_version}dist(zstandard)
|
|
|
f312251 |
Provides: python-kafka+zstd = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f312251 |
Provides: python%{python3_version}-kafka+zstd = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
f312251 |
Provides: python%{python3_version}dist(kafka-python[zstd]) = %{?epoch:%{epoch}:}%{version}
|
|
|
f312251 |
Provides: python3dist(kafka-python[zstd]) = %{?epoch:%{epoch}:}%{version}
|
|
|
f312251 |
|
|
|
f312251 |
%description -n python3-kafka+zstd
|
|
|
f312251 |
This is a metapackage bringing in zstd extras requires for python3-kafka.
|
|
|
f312251 |
It makes sure the dependencies are installed.
|
|
|
f312251 |
|
|
|
f312251 |
%files -n python3-kafka+zstd
|
|
|
1f8d143 |
|
|
|
1f8d143 |
|
|
|
f312251 |
%changelog
|
|
|
02f058d |
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-14
|
|
|
02f058d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
02f058d |
|
|
|
c65b1b5 |
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-13
|
|
|
c65b1b5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
c65b1b5 |
|
|
|
8122aa5 |
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-12
|
|
|
8122aa5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
8122aa5 |
|
|
|
4fd34b3 |
* Tue Jul 11 2023 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-11
|
|
|
4fd34b3 |
- Applies patches for Python 3.12
|
|
|
4fd34b3 |
|
|
|
69141bd |
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 2.0.2-10
|
|
|
69141bd |
- Rebuilt for Python 3.12
|
|
|
69141bd |
|
|
|
f7b7850 |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-9
|
|
|
f7b7850 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
f7b7850 |
|
|
|
3e746b1 |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-8
|
|
|
3e746b1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
3e746b1 |
|
|
|
e2ad477 |
* Mon Jun 27 2022 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-8
|
|
|
e2ad477 |
- Applies test_assignors.py.patch for Python 3.11
|
|
|
e2ad477 |
|
|
|
198e863 |
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 2.0.2-7
|
|
|
198e863 |
- Rebuilt for Python 3.11
|
|
|
198e863 |
|
|
|
b3a6626 |
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-6
|
|
|
b3a6626 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
b3a6626 |
|
|
|
f312251 |
* Wed Sep 29 2021 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-5
|
|
|
f312251 |
- Fixes a rpmlint error
|
|
|
1f8d143 |
|
|
|
f312251 |
* Wed Sep 29 2021 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-4
|
|
|
f312251 |
- Fixes issues on packaging guidelines
|
|
|
1f8d143 |
|
|
|
f312251 |
* Mon Sep 27 2021 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-3
|
|
|
f312251 |
- Fixes issues on packaging guidelines
|
|
|
1f8d143 |
|
|
|
f312251 |
* Fri Sep 24 2021 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-2
|
|
|
f312251 |
- Fixes issues on packaging guidelines
|
|
|
f312251 |
|
|
|
f312251 |
* Sun Sep 19 2021 Hirotaka Wakabayashi <hiwkby@yahoo.com> - 2.0.2-1
|
|
|
f312251 |
- Un-retired and update to 2.0.2
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Mon Feb 11 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.3-3
|
|
|
1f8d143 |
- Subpackage python2-kafka has been removed
|
|
|
1f8d143 |
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Thu Jul 19 2018 Matthias Runge <mrunge@redhat.com> - 1.4.3-1
|
|
|
1f8d143 |
- rebuild for python 3.7
|
|
|
1f8d143 |
- modernize spec file
|
|
|
1f8d143 |
- update to 1.4.3 (rhbz#1306795)
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-8
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.1-7
|
|
|
1f8d143 |
- Rebuilt for Python 3.7
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-6
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Thu Jan 25 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.3.1-5
|
|
|
1f8d143 |
- Update Python 2 dependency declarations to new packaging standards
|
|
|
1f8d143 |
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3.1-4
|
|
|
1f8d143 |
- Python 2 binary package renamed to python2-kafka
|
|
|
1f8d143 |
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Thu Jan 26 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 1.3.1-1
|
|
|
1f8d143 |
- Upstream 1.3.1
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.9.4-4
|
|
|
1f8d143 |
- Rebuild for Python 3.6
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
|
|
|
1f8d143 |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.4-2
|
|
|
1f8d143 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
1f8d143 |
|
|
|
1f8d143 |
* Tue Nov 17 2015 Pradeep Kilambi <pkilambi@redhat.com> 0.9.4
|
|
|
1f8d143 |
- Initial package based on python-kafka.
|
|
|
f312251 |
|