]> git.pld-linux.org Git - SPECS.git/blob - httpie.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / httpie.spec
1 Summary:        A Curl-like tool for humans
2 Name:           httpie
3 Version:        0.7.2
4 Release:        2
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/
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
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
43 %py_build
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 %py_install
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
This page took 0.359888 seconds and 3 git commands to generate.