[httpie] Initial import (#927457)

Ricky Elrod codeblock at fedoraproject.org
Wed Mar 27 16:04:52 UTC 2013


commit 6e02a059637cd9c1245d16c1715f6fc49f7236e1
Author: Ricky Elrod <ricky at elrod.me>
Date:   Wed Mar 27 12:04:02 2013 -0400

    Initial import (#927457)

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


More information about the scm-commits mailing list