piotrp pushed to python-elasticsearch (master). "add python3 module"
notifications at fedoraproject.org
notifications at fedoraproject.org
Thu May 14 22:45:05 UTC 2015
From 1dce51addf71aac799a055151c3c85be8968433d Mon Sep 17 00:00:00 2001
From: Piotr Popieluch <piotr1212 at gmail.com>
Date: Fri, 15 May 2015 00:44:45 +0200
Subject: add python3 module
diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec
index a6ddbab..ae9e27f 100644
--- a/python-elasticsearch.spec
+++ b/python-elasticsearch.spec
@@ -1,17 +1,25 @@
-%global tarball_name elasticsearch
+%global tarball_name elasticsearch
+%bcond_without python3
Name: python-elasticsearch
Version: 1.4.0
-Release: 1%{?dist}
-Summary: Client for Elasticsearch
+Release: 2%{?dist}
+Summary: Client for Elasticsearch
-Group: Development/Languages
License: ASL 2.0
URL: https://github.com/elasticsearch/elasticsearch-py
Source0: https://pypi.python.org/packages/source/e/%{tarball_name}/%{tarball_name}-%{version}.tar.gz
BuildArch: noarch
-BuildRequires: python2-devel python-setuptools
-Requires: python-thrift python-urllib3
+
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+Requires: python-thrift
+
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+# optional thrift not supported on Python 3
+%endif
%description
Low level client for Elasticsearch. It's goal is to provide common ground
@@ -26,23 +34,75 @@ for all Elasticsearch-related code in Python. The client's features include:
- Thread safety
- Pluggable architecture
+%if %{with python3}
+%package -n python3-%{tarball_name}
+Summary: Python 3 Client for Elasticsearch
+License: ASL 2.0
+
+%description -n python3-%{tarball_name}
+Low level client for Elasticsearch. It's goal is to provide common ground
+for all Elasticsearch-related code in Python. The client's features include:
+
+- Translating basic Python data types to and from json
+- Configurable automatic discovery of cluster nodes
+- Persistent connections
+- Load balancing (with pluggable selection strategy) across all available nodes
+- Failed connection penalization (time based - failed connections won't be
+ retried until a timeout is reached)
+- Thread safety
+- Pluggable architecture
+%endif
+
%prep
%setup -qn %{tarball_name}-%{version}
rm -fr %{tarball_name}.egg-info
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
%build
%{__python2} setup.py build
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
%install
-rm -rf %{buildroot}
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
+%endif
+
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%files
-%{python2_sitelib}/*
-%doc README LICENSE
+%{python2_sitelib}/%{tarball_name}
+%{python2_sitelib}/%{tarball_name}-%{version}-py2.?.egg-info
+%doc README
+%license LICENSE
+
+%if %{with python3}
+%files -n python3-elasticsearch
+%{python3_sitelib}/%{tarball_name}
+%{python3_sitelib}/%{tarball_name}-%{version}-py3.?.egg-info
+%doc README
+%license LICENSE
+%endif
%changelog
+* Thu May 14 2015 Piotr Popieluch <piotr1212 at gmail.com> - 1.4.0-2
+- Add python3 module
+- Remove trailing whitespace
+- Remove deprecated group tag
+- Move license from %%doc to %%license
+- Remove deprecated rm -rf buildroot
+- fix rpmlint Error: explicit-lib-dependency python-urllib3
+
* Tue Apr 07 2015 Alan Pevec <apevec at fedoraproject.org> - 1.4.0-1
- Upgrade to 1.4.0 version
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/python-elasticsearch.git/commit/?h=master&id=1dce51addf71aac799a055151c3c85be8968433d
More information about the scm-commits
mailing list