]>
Commit | Line | Data |
---|---|---|
a4f97c12 ER |
1 | Summary: A Curl-like tool for humans |
2 | Name: httpie | |
3 | Version: 0.7.2 | |
9eb5bed2 | 4 | Release: 2 |
a4f97c12 ER |
5 | License: BSD |
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/ | |
00b13274 ER |
10 | BuildRequires: python-distribute |
11 | BuildRequires: rpm-pythonprov | |
a4f97c12 ER |
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 | |
19 | BuildArch: noarch | |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
22 | %description | |
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. | |
26 | ||
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. | |
30 | ||
31 | %prep | |
32 | %setup -q | |
33 | ||
34 | sed -i '/#!\%{_prefix}\/bin\/env/d' %{name}/__main__.py | |
35 | ||
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 | |
41 | ||
42 | %build | |
1fbcd904 | 43 | %py_build |
a4f97c12 ER |
44 | |
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
1fbcd904 | 47 | %py_install |
a4f97c12 ER |
48 | %py_postclean |
49 | ||
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 | |
53 | ||
54 | %clean | |
55 | rm -rf $RPM_BUILD_ROOT | |
56 | ||
57 | %files | |
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 |