1 Summary: A Curl-like tool for humans
6 Group: Applications/Networking
7 Source0: http://pypi.python.org/packages/source/h/httpie/%{name}-%{version}.tar.gz
8 # Source0-md5: 09218336048596da757c4f0cf19642fd
9 URL: http://httpie.org/
10 BuildRequires: python-distribute
11 BuildRequires: rpm-pythonprov
12 BuildRequires: sed >= 4.0
13 # Needed so we can build the manpage with help2man without fataling.
14 BuildRequires: help2man
15 BuildRequires: python-pygments
16 BuildRequires: python-requests
17 Requires: python-pygments
18 Requires: python-requests
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 HTTPie is a CLI HTTP utility built out of frustration with existing
24 tools. The goal is to make CLI interaction with HTTP-based services as
25 human-friendly as possible.
27 HTTPie does so by providing an http command that allows for issuing
28 arbitrary HTTP requests using a simple and natural syntax and
29 displaying colorized responses.
34 sed -i '/#!\%{_prefix}\/bin\/env/d' %{name}/__main__.py
36 # Fedora currently only ships with Pygments 1.4 but httpie wants 1.5.
37 # Also, RHEL currently only ships with Pygments 1.1.
38 # However, it seems to work just fine with lower versions.
39 sed -i 's/Pygments>=1.5/Pygments>=1.1/' setup.py
40 sed -i 's/requests>=2.0.0/requests>=1.1.0/' setup.py
46 rm -rf $RPM_BUILD_ROOT
50 export PYTHONPATH=$RPM_BUILD_ROOT%{py_sitescriptdir}
51 install -d $RPM_BUILD_ROOT%{_mandir}/man1
52 help2man --no-discard-stderr $RPM_BUILD_ROOT%{_bindir}/http > $RPM_BUILD_ROOT%{_mandir}/man1/http.1
55 rm -rf $RPM_BUILD_ROOT
58 %defattr(644,root,root,755)
59 %doc LICENSE README.rst
60 %attr(755,root,root) %{_bindir}/http
61 %{_mandir}/man1/http.1*
62 %{py_sitescriptdir}/httpie
63 %{py_sitescriptdir}/httpie-%{version}-py*.egg-info