| |
@@ -1,34 +1,21 @@
|
| |
- %if 0%{?fedora}
|
| |
- %global with_python3 1
|
| |
- %endif
|
| |
-
|
| |
Name: httpie
|
| |
- Version: 0.9.4
|
| |
+ Version: 1.0.3
|
| |
Release: 1%{?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
|
| |
+ URL: https://httpie.org/
|
| |
+ Source0: https://github.com/httpie/httpie/archive/%{version}/%{name}-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
+ Obsoletes: python2-httpie < 0.9.5
|
| |
|
| |
- BuildRequires: python2-devel
|
| |
-
|
| |
- # Needed so we can build the manpage with help2man without fataling.
|
| |
- BuildRequires: python-pygments
|
| |
- BuildRequires: python-requests
|
| |
- %if 0%{?fedora}
|
| |
- BuildRequires: help2man
|
| |
- %endif
|
| |
+ Requires: python3
|
| |
+ Requires: python36-pygments
|
| |
+ Requires: python36-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
|
| |
- %endif
|
| |
+ BuildRequires: python3-setuptools
|
| |
|
| |
%description
|
| |
HTTPie is a CLI HTTP utility built out of frustration with existing tools. The
|
| |
@@ -39,145 +26,41 @@
|
| |
HTTP requests using a simple and natural syntax and displaying colorized
|
| |
responses.
|
| |
|
| |
- %package -n python2-httpie
|
| |
- Summary: A Curl-like tool for humans
|
| |
- Group: Applications/Internet
|
| |
- %{?python_provide:%python_provide python2-httpie}
|
| |
- %if 0%{?with_python3}
|
| |
- # Then the python3 package below will provide "httpie"
|
| |
- %else
|
| |
- # Otherwise, the python2 package here will provide it.
|
| |
- Provides: httpie%{?_isa} = %{version}-%{release}
|
| |
- Obsoletes: httpie < 0.9.3-2
|
| |
- %endif
|
| |
-
|
| |
- Requires: python2
|
| |
- Requires: python-pygments
|
| |
- Requires: python-requests
|
| |
-
|
| |
- %description -n python2-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.
|
| |
-
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- %package -n python3-httpie
|
| |
- Summary: A Curl-like tool for humans
|
| |
- Group: Applications/Internet
|
| |
- %{?python_provide:%python_provide python3-httpie}
|
| |
- Provides: httpie%{?_isa} = %{version}-%{release}
|
| |
- Obsoletes: httpie < 0.9.3-2
|
| |
-
|
| |
- Requires: python3
|
| |
- Requires: python3-pygments
|
| |
- Requires: python3-requests
|
| |
-
|
| |
- %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
|
| |
|
| |
- # RHEL ships version 1.4, which works fine here.
|
| |
- sed -i 's/Pygments>=1.5/Pygments>=1.4/' setup.py
|
| |
+ # RHEL7 ships version 2.2, which works fine here.
|
| |
+ sed -i 's/Pygments>=2.3.1/Pygments>=2.2.0/' setup.py
|
| |
|
| |
- # RHEL ships version 2.6.0 which works fine here.
|
| |
- sed -i 's/requests>=2.10.0/requests>=2.6.0/' setup.py
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- rm -rf %{py3dir}
|
| |
- cp -a . %{py3dir}
|
| |
- %endif
|
| |
+ # RHEL7 ships version 2.6.0 which works fine here.
|
| |
+ sed -i 's/requests>=2.21.0/requests>=2.6.0/' setup.py
|
| |
|
| |
%build
|
| |
- %{__python2} setup.py build
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- pushd %{py3dir}
|
| |
- %{__python3} setup.py build
|
| |
- popd
|
| |
- %endif
|
| |
+ export LANG=en_US.utf-8
|
| |
+ %py3_build
|
| |
|
| |
%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
|
| |
-
|
| |
- %{__python2} setup.py install --root %{buildroot}
|
| |
- mv %{buildroot}/%{_bindir}/http %{buildroot}/%{_bindir}/python2-http
|
| |
-
|
| |
- export PYTHONPATH=%{buildroot}%{python2_sitelib}
|
| |
-
|
| |
- # Create a link to the default executable
|
| |
- %if 0%{?with_python3}
|
| |
- ln -s python3-http %{buildroot}/%{_bindir}/http
|
| |
- %else
|
| |
- ln -s python2-http %{buildroot}/%{_bindir}/http
|
| |
- %endif
|
| |
-
|
| |
- # Generate man pages for everything
|
| |
- %if 0%{?fedora}
|
| |
- mkdir -p %{buildroot}/%{_mandir}/man1
|
| |
- help2man --no-discard-stderr %{buildroot}/%{_bindir}/http > %{buildroot}/%{_mandir}/man1/http.1
|
| |
- help2man --no-discard-stderr %{buildroot}/%{_bindir}/python2-http > %{buildroot}/%{_mandir}/man1/python2-http.1
|
| |
- %if 0%{?with_python3}
|
| |
- help2man --no-discard-stderr %{buildroot}/%{_bindir}/python3-http > %{buildroot}/%{_mandir}/man1/python3-http.1
|
| |
- %endif
|
| |
- %endif
|
| |
-
|
| |
-
|
| |
- %files -n python2-httpie
|
| |
- %doc README.rst
|
| |
- %license LICENSE
|
| |
- %{python2_sitelib}/%{name}/
|
| |
- %{python2_sitelib}/%{name}-%{version}*
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- %{_bindir}/python2-http
|
| |
- %if 0%{?fedora}
|
| |
- %{_mandir}/man1/python2-http.1*
|
| |
- %endif
|
| |
- %else
|
| |
- %{_bindir}/http
|
| |
- %{_bindir}/python2-http
|
| |
- %if 0%{?fedora}
|
| |
- %{_mandir}/man1/http.1*
|
| |
- %{_mandir}/man1/python2-http.1*
|
| |
- %endif
|
| |
- %endif
|
| |
-
|
| |
- %if 0%{?with_python3}
|
| |
- %files -n python3-httpie
|
| |
+ export LANG=en_US.utf-8
|
| |
+ %py3_install
|
| |
+
|
| |
+ # pytest-httpbin is not available in EPEL7, can't run checks
|
| |
+ #%%check
|
| |
+ #%%pytest -v
|
| |
+
|
| |
+ %files
|
| |
%doc README.rst
|
| |
%license LICENSE
|
| |
%{python3_sitelib}/%{name}/
|
| |
%{python3_sitelib}/%{name}-%{version}*
|
| |
-
|
| |
%{_bindir}/http
|
| |
- %{_bindir}/python3-http
|
| |
- %if 0%{?fedora}
|
| |
- %{_mandir}/man1/http.1*
|
| |
- %{_mandir}/man1/python3-http.1*
|
| |
- %endif
|
| |
- %endif
|
| |
|
| |
%changelog
|
| |
+ * Mon Aug 09 2021 Mikel Olasagasti <mikel@olasagasti.info> - 1.0.3-1
|
| |
+ - Update to latest possible version for EPEL7
|
| |
+ - Remove Fedora bits
|
| |
+ - Remove python2 bits
|
| |
+
|
| |
* Tue Jul 05 2016 Ricky Elrod <relrod@redhat.com> - 0.9.4-1
|
| |
- Update to latest upstream.
|
| |
|
| |