!6 kafka-python package init

From: @bzg1107
Reviewed-by: @disnight,@xiyuanwang,@xiyuanwang
Signed-off-by: @xiyuanwang
This commit is contained in:
openeuler-ci-bot 2021-08-31 10:51:41 +00:00 committed by Gitee
commit 77e4bc5a54
2 changed files with 87 additions and 0 deletions

BIN
kafka-python-2.0.2.tar.gz Normal file

Binary file not shown.

87
python-kafka.spec Normal file
View File

@ -0,0 +1,87 @@
Name: python-kafka-python
Version: 2.0.2
Release: 1
Summary: Pure Python client for Apache Kafka
License: Apache-2.0
URL: https://github.com/dpkp/kafka-python
Source0: https://files.pythonhosted.org/packages/81/94/f9151888b40339f2624759df8241080020acafed49d3a4369ceedd72c096/kafka-python-%{version}.tar.gz
BuildArch: noarch
%description
Kafka Python client
Python client for the Apache Kafka distributed stream processing system.
kafka-python is designed to function much like the official java client, with a
sprinkling of pythonic interfaces (e.g., consumer iterators).
%package -n python3-kafka-python
Summary: Pure Python client for Apache Kafka
Provides: python3-kafka
Provides: python3-kafka-python
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-kafka-python
Kafka Python client
Python client for the Apache Kafka distributed stream processing system.
kafka-python is designed to function much like the official java client, with a
sprinkling of pythonic interfaces (e.g., consumer iterators).
%package help
Summary: Development documents and examples for kafka-python
Provides: python3-kafka-python-doc
%description help
Kafka Python client
Python client for the Apache Kafka distributed stream processing system.
kafka-python is designed to function much like the official java client, with a
sprinkling of pythonic interfaces (e.g., consumer iterators).description
%prep
%autosetup -n kafka-python-%{version}
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-kafka-python -f filelist.lst
%{python3_sitelib}/*
%files help
%{_docdir}/*
%changelog
- Tue Aug 31 2021 baizhonggui <baizhonggui@huawei.com> - 2.0.2-1
- Package init