diff --git a/confluent_kafka-2.12.2.tar.gz b/confluent_kafka-2.12.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..207c9457497edcf4deed6f5f94f058c91c7c927e Binary files /dev/null and b/confluent_kafka-2.12.2.tar.gz differ diff --git a/python-confluent-kafka.spec b/python-confluent-kafka.spec new file mode 100644 index 0000000000000000000000000000000000000000..3f1d6f1035ad516b0c50d97fae9204788e2530cd --- /dev/null +++ b/python-confluent-kafka.spec @@ -0,0 +1,64 @@ +%global sname confluent-kafka +%global pypi_name confluent_kafka + +Name: python-%{sname} +Version: 2.12.2 +Release: 1%{?dist} +Summary: Confluent's Apache Kafka client for Python + +# Automatically converted from old format: ASL 2.0 - review is highly recommended. +License: Apache-2.0 +URL: https://github.com/confluentinc/confluent-kafka-python +Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz + +%description +confluent-kafka-python is Confluent's Python client for Apache Kafka +and the Confluent Platform. + +%package -n python3-%{sname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{sname}} +BuildRequires: gcc +BuildRequires: librdkafka-devel +BuildRequires: python3-devel +# Unit tests are present in the upstream repo, but not in the PyPi distribution +# https://github.com/confluentinc/confluent-kafka-python/issues/508 +#BuildRequires: python3dist(pytest) +BuildRequires: python3-setuptools, python3-pip, python3-flit-core + +Requires: python3-fastavro +Requires: python3-requests +Requires: librdkafka >= 2.4.0 +%description -n python3-%{sname} +confluent-kafka-python is Confluent's Python client for Apache Kafka +and the Confluent Platform. + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{sname}.egg-info + +%build +%pyproject_build + +%install +%pyproject_install +# Remove license file installed in weird place +rm -f %{buildroot}/%{_prefix}/LICENSE.txt + +%check +# Unit tests are present in the upstream repo, but not in the PyPi distribution +# So just import test +%py3_check_import confluent_kafka +#py.test-3 -v --ignore=tests/integration ./tests/ + +%files -n python3-%{sname} +%license LICENSE.txt +%doc README.md +%{python3_sitearch}/confluent_kafka +%{python3_sitearch}/confluent_kafka-%{version}-py%{python3_version}.egg-info + +%changelog +* Thu Nov 13 2025 anyunhao - 2.12.2-1 +- Package init +