|
Ricky Elrod |
6e02a05 |
%if 0%{?fedora}
|
|
Ricky Elrod |
6e02a05 |
%global with_python3 1
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
Name: httpie
|
|
Ricky Elrod |
6e02a05 |
Version: 0.4.1
|
|
Ricky Elrod |
7f42999 |
Release: 3%{?dist}
|
|
Ricky Elrod |
6e02a05 |
Summary: A Curl-like tool for humans
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
Group: Applications/Internet
|
|
Ricky Elrod |
6e02a05 |
License: BSD
|
|
Ricky Elrod |
6e02a05 |
URL: http://httpie.org/
|
|
Ricky Elrod |
6e02a05 |
Source0: http://pypi.python.org/packages/source/h/httpie/httpie-%{version}.tar.gz
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python2-devel
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
# Needed so we can build the manpage with help2man without fataling.
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python-pygments = 1.4
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python-requests
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: help2man
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
Requires: python-pygments = 1.4
|
|
Ricky Elrod |
6e02a05 |
Requires: python-requests
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python3-devel
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
# Needed so we can build the manpage with help2man without fataling.
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python3-pygments = 1.4
|
|
Ricky Elrod |
6e02a05 |
BuildRequires: python3-requests
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
BuildArch: noarch
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%description
|
|
Ricky Elrod |
6e02a05 |
HTTPie is a CLI HTTP utility built out of frustration with existing tools. The
|
|
Ricky Elrod |
6e02a05 |
goal is to make CLI interaction with HTTP-based services as human-friendly as
|
|
Ricky Elrod |
6e02a05 |
possible.
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
HTTPie does so by providing an http command that allows for issuing arbitrary
|
|
Ricky Elrod |
6e02a05 |
HTTP requests using a simple and natural syntax and displaying colorized
|
|
Ricky Elrod |
6e02a05 |
responses.
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
%package -n python3-httpie
|
|
Ricky Elrod |
6e02a05 |
Summary: A Curl-like tool for humans
|
|
Ricky Elrod |
6e02a05 |
Group: Applications/Internet
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
Requires: python3
|
|
Ricky Elrod |
6e02a05 |
Requires: python3-pygments = 1.4
|
|
Ricky Elrod |
6e02a05 |
Requires: python3-requests
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%description -n python3-httpie
|
|
Ricky Elrod |
6e02a05 |
HTTPie is a CLI HTTP utility built out of frustration with existing tools. The
|
|
Ricky Elrod |
6e02a05 |
goal is to make CLI interaction with HTTP-based services as human-friendly as
|
|
Ricky Elrod |
6e02a05 |
possible.
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
HTTPie does so by providing an http command that allows for issuing arbitrary
|
|
Ricky Elrod |
6e02a05 |
HTTP requests using a simple and natural syntax and displaying colorized
|
|
Ricky Elrod |
6e02a05 |
responses.
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%prep
|
|
Ricky Elrod |
6e02a05 |
%setup -q
|
|
Ricky Elrod |
6e02a05 |
sed -i '/#!\/usr\/bin\/env/d' %{name}/__main__.py
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
# Fedora currently only ships with Pygments 1.4 but httpie wants 1.5.
|
|
Ricky Elrod |
6e02a05 |
# However, it seems to work just fine with 1.4, and when the Fedora package
|
|
Ricky Elrod |
6e02a05 |
# gets updated, we can, and should, nuke this.
|
|
Ricky Elrod |
6e02a05 |
sed -i 's/Pygments>=1.5/Pygments>=1.4/' setup.py
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
rm -rf %{py3dir}
|
|
Ricky Elrod |
6e02a05 |
cp -a . %{py3dir}
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%build
|
|
Ricky Elrod |
6e02a05 |
%{__python} setup.py build
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
pushd %{py3dir}
|
|
Ricky Elrod |
6e02a05 |
%{__python3} setup.py build
|
|
Ricky Elrod |
6e02a05 |
popd
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%install
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
pushd %{py3dir}
|
|
Ricky Elrod |
6e02a05 |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
Ricky Elrod |
6e02a05 |
mv %{buildroot}/%{_bindir}/http %{buildroot}/%{_bindir}/python3-http
|
|
Ricky Elrod |
6e02a05 |
popd
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%{__python} setup.py install --root %{buildroot}
|
|
Ricky Elrod |
7f42999 |
|
|
Ricky Elrod |
7f42999 |
export PYTHONPATH=%{buildroot}%{python_sitelib}
|
|
Ricky Elrod |
7f42999 |
|
|
Ricky Elrod |
6e02a05 |
mkdir -p %{buildroot}/%{_mandir}/man1
|
|
Ricky Elrod |
6e02a05 |
help2man --no-discard-stderr %{buildroot}/%{_bindir}/http > %{buildroot}/%{_mandir}/man1/http.1
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
help2man --no-discard-stderr %{buildroot}/%{_bindir}/python3-http > %{buildroot}/%{_mandir}/man1/python3-http.1
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%files
|
|
Ricky Elrod |
6e02a05 |
%doc LICENSE README.rst
|
|
Ricky Elrod |
6e02a05 |
%{_mandir}/man1/http.1*
|
|
Ricky Elrod |
6e02a05 |
%{python_sitelib}/%{name}/
|
|
Ricky Elrod |
6e02a05 |
%{python_sitelib}/%{name}-%{version}*
|
|
Ricky Elrod |
6e02a05 |
%{_bindir}/http
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%if 0%{?with_python3}
|
|
Ricky Elrod |
6e02a05 |
%files -n python3-httpie
|
|
Ricky Elrod |
6e02a05 |
%doc LICENSE README.rst
|
|
Ricky Elrod |
6e02a05 |
%{_mandir}/man1/python3-http.1*
|
|
Ricky Elrod |
6e02a05 |
%{python3_sitelib}/%{name}/
|
|
Ricky Elrod |
6e02a05 |
%{python3_sitelib}/%{name}-%{version}*
|
|
Ricky Elrod |
6e02a05 |
%{_bindir}/python3-http
|
|
Ricky Elrod |
6e02a05 |
%endif
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
%changelog
|
|
Ricky Elrod |
7f42999 |
* Mon Apr 8 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-3
|
|
Ricky Elrod |
7f42999 |
- Fix manpage generation by exporting PYTHONPATH.
|
|
Ricky Elrod |
7f42999 |
|
|
Ricky Elrod |
6e02a05 |
* Mon Mar 26 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-2
|
|
Ricky Elrod |
6e02a05 |
- Include Python3 support, and fix other review blockers.
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
* Mon Mar 11 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-1
|
|
Ricky Elrod |
6e02a05 |
- Update to latest upstream release
|
|
Ricky Elrod |
6e02a05 |
|
|
Ricky Elrod |
6e02a05 |
* Thu Jul 19 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.2.5-1
|
|
Ricky Elrod |
6e02a05 |
- Initial build.
|