Last active
August 29, 2015 14:02
-
-
Save bodgit/88e336f06e9924048665 to your computer and use it in GitHub Desktop.
RPM spec for Elasticsearch python bindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -up elasticsearch-1.2.0/elasticsearch.egg-info/requires.txt.orig elasticsearch-1.2.0/elasticsearch.egg-info/requires.txt | |
--- elasticsearch-1.2.0/elasticsearch.egg-info/requires.txt.orig 2014-08-12 10:09:32.219400798 +0000 | |
+++ elasticsearch-1.2.0/elasticsearch.egg-info/requires.txt 2014-08-12 10:09:36.809346008 +0000 | |
@@ -1 +1 @@ | |
-urllib3>=1.8, <2.0 | |
\ No newline at end of file | |
+urllib3>=1.5, <2.0 | |
diff -up elasticsearch-1.2.0/setup.py.orig elasticsearch-1.2.0/setup.py | |
--- elasticsearch-1.2.0/setup.py.orig 2014-08-12 10:08:38.643339969 +0000 | |
+++ elasticsearch-1.2.0/setup.py 2014-08-12 10:08:44.712437366 +0000 | |
@@ -13,7 +13,7 @@ long_description = f.read().strip() | |
f.close() | |
install_requires = [ | |
- 'urllib3>=1.8, <2.0', | |
+ 'urllib3>=1.5, <2.0', | |
] | |
tests_require = [ | |
'requests>=1.0.0, <3.0.0', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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 srcname elasticsearch | |
Name: python-elasticsearch | |
Version: 1.2.0 | |
Release: 2%{?dist} | |
Summary: Python client for Elasticsearch | |
Group: Development/Libraries | |
License: Apache | |
URL: https://github.com/elasticsearch/elasticsearch-py | |
Source0: %{srcname}-%{version}.tar.gz | |
Patch0: %{srcname}-1.2.0-urllib.patch | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
BuildArch: noarch | |
BuildRequires: python-setuptools | |
Requires: python-unittest2 | |
%description | |
Official low-level client for Elasticsearch. It's goal is to provide common | |
ground for all Elasticsearch-related code in Python; because of this it tries | |
to be opinion-free and very extendable. | |
%prep | |
%setup -q -n %{srcname}-%{version} | |
%patch0 -p1 | |
%build | |
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build | |
%install | |
rm -rf %{buildroot} | |
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT | |
%clean | |
rm -rf %{buildroot} | |
%files | |
%defattr(-,root,root,-) | |
%doc | |
%{python2_sitelib}/%{srcname}-%{version}-py*.egg-info/* | |
%{python2_sitelib}/%{srcname}/* | |
%changelog | |
* Tue Aug 12 2014 Matt Dainty <[email protected]> 1.2.0-2 | |
- Update dependencies, patch urllib requirement back down. | |
* Tue Aug 12 2014 Matt Dainty <[email protected]> 1.2.0-1 | |
- Bump to 1.2.0. | |
* Mon Jun 23 2014 Matt Dainty <[email protected]> 1.0.0-1 | |
- Initial build. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment