piotrp pushed to python-elasticsearch (epel7). "build for epel"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu May 14 18:45:06 UTC 2015


From 4636999d29a04fd68b6704ab27b015cfc301137b Mon Sep 17 00:00:00 2001
From: Piotr Popieluch <piotr1212 at gmail.com>
Date: Thu, 14 May 2015 20:42:33 +0200
Subject: build for epel


diff --git a/python-elasticsearch.spec b/python-elasticsearch.spec
index 90a4b1e..95814ad 100644
--- a/python-elasticsearch.spec
+++ b/python-elasticsearch.spec
@@ -1,3 +1,10 @@
+# needed for epel6
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2: %global __python2 /usr/bin/python2}
+%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
 %global tarball_name elasticsearch 
 
 Name:           python-elasticsearch
@@ -11,7 +18,11 @@ 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
+Requires:       python-urllib3
+# rhel6 has no thrift, thrift is optional
+%if 0%{?rhel} > 6 || 0%{?fedora}
+Requires:       python-thrift
+%endif
 
 %description
 Low level client for Elasticsearch. It's goal is to provide common ground
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-elasticsearch.git/commit/?h=epel7&id=4636999d29a04fd68b6704ab27b015cfc301137b


More information about the scm-commits mailing list