Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > ebde8275a72d70a0120df011375902c5 > files > 2

httpie-0.8.0-6.mga5.src.rpm

%global with_python3 1

Name:           httpie
Version:        0.8.0
Release:        %mkrel 6
Summary:        A Curl-like tool for humans

Group:          Networking/WWW
License:        BSD
URL:            http://httpie.org/
Source0:        http://pypi.python.org/packages/source/h/httpie/httpie-%{version}.tar.gz
BuildRequires:  python-devel

# Needed so we can build the manpage with help2man without fataling.
BuildRequires:  python-pygments
BuildRequires:  python-requests
BuildRequires:  python-setuptools
BuildRequires:  help2man

Requires:       python-pygments
Requires:       python-requests

%if 0%{?with_python3}
BuildRequires:  python3-devel

# Needed so we can build the manpage with help2man without fataling.
BuildRequires:  python3-pygments
BuildRequires:  python3-requests
BuildRequires:  python3-setuptools
%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:          Networking/WWW

%if 0%{?with_python3}
Requires:       python3
Requires:       python3-pygments
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.
# Also, RHEL currently only ships with Pygments 1.1.
# However, it seems to work just fine with lower versions.
sed -i 's/Pygments>=1.5/Pygments>=1.1/' setup.py

sed -i 's/requests>=2.0.0/requests>=1.1.0/' 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}

export PYTHONPATH=%{buildroot}%{python_sitelib}

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
%{python_sitelib}/%{name}/
%{python_sitelib}/%{name}-%{version}*
%{_bindir}/http
%{_mandir}/man1/http.1*

%if 0%{?with_python3}
%files -n python3-httpie
%doc LICENSE README.rst
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}-%{version}*
%{_bindir}/python3-http
%{_mandir}/man1/python3-http.1*
%endif



%changelog
* Wed Oct 15 2014 umeabot <umeabot> 0.8.0-6.mga5
+ Revision: 747194
- Second Mageia 5 Mass Rebuild

* Sat Sep 27 2014 tv <tv> 0.8.0-5.mga5
+ Revision: 726469
- rebuild for missing pythoneggs deps

* Tue Sep 16 2014 umeabot <umeabot> 0.8.0-4.mga5
+ Revision: 680198
- Mageia 5 Mass Rebuild

* Sat May 31 2014 pterjan <pterjan> 0.8.0-3.mga5
+ Revision: 629676
- Rebuild for new Python

* Sat May 31 2014 pterjan <pterjan> 0.8.0-2.mga5
+ Revision: 628255
- Rebuild for new Python

* Wed Apr 02 2014 shlomif <shlomif> 0.8.0-1.mga5
+ Revision: 611320
- Add BR
- Change to mkrel
- Importing httpie based on the Fedora package


* Fri Jan 31 2014 Ricky Elrod <codeblock@fedoraproject.org> - 0.8.0-1
- Latest upstream release.

* Fri Oct 4 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.7.2-2
- Add in patch to work without having python-requests 2.0.0.

* Sat Sep 28 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.7.2-1
- Latest upstream release.

* Thu Sep 5 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-7
- Only try building the manpage on Fedora, since RHEL's help2man doesn't
  have the --no-discard-stderr flag.

* Thu Sep 5 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-6
- Loosen the requirement on python-pygments.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 2 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-4
- python-requests 1.2.3 exists in rawhide now.

* Sun Jun 30 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-3
- Patch to use python-requests 1.1.0 for now.

* Sat Jun 29 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-2
- Update to latest upstream release.

* Mon Apr 29 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.5.0-2
- Fix changelog messup.

* Mon Apr 29 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.5.0-1
- Update to latest upstream release.

* Mon Apr 8 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-3
- Fix manpage generation by exporting PYTHONPATH.

* Tue Mar 26 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-2
- Include Python3 support, and fix other review blockers.

* Mon Mar 11 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.4.1-1
- Update to latest upstream release

* Thu Jul 19 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.2.5-1
- Initial build.