Cleanup spec
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
a10e8678f6
commit
6463ecb14c
@ -1,95 +1,64 @@
|
|||||||
%if 0%{?fedora} >= 13
|
%global srcname httplib2
|
||||||
%global with_python3 1
|
|
||||||
%else
|
|
||||||
%if 0%{?rhel} >= 7
|
|
||||||
%global with_python3 1
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: python-httplib2
|
Name: python-%{srcname}
|
||||||
Version: 0.17.3
|
Version: 0.17.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A comprehensive HTTP client library
|
Summary: Comprehensive HTTP client library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/httplib2
|
URL: https://pypi.python.org/pypi/httplib2
|
||||||
Source0: https://files.pythonhosted.org/packages/b4/ff/605ae6e8e77cad745c877d512851cc40d75d8068b1e456fcb4e30ee2d944/httplib2-0.17.3.tar.gz
|
Source: %{pypi_source}
|
||||||
#
|
#
|
||||||
# Patch to use the Fedora ca certs instead of the bundled ones
|
# Patch to use the Fedora ca certs instead of the bundled ones
|
||||||
#
|
#
|
||||||
Patch1: python-httplib2.certfile.patch
|
Patch1: python-%{srcname}.certfile.patch
|
||||||
|
|
||||||
BuildRequires: python2-setuptools
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
%endif
|
|
||||||
# if with_python3
|
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
A comprehensive HTTP client library that supports many features left out of\
|
A comprehensive HTTP client library that supports many features left out of\
|
||||||
other HTTP libraries.
|
other HTTP libraries.
|
||||||
|
|
||||||
%description %_description
|
%description %{_description}
|
||||||
|
|
||||||
%package -n python2-httplib2
|
%package -n python2-%{srcname}
|
||||||
Summary: %summary
|
Summary: %{summary}
|
||||||
%{?python_provide:%python_provide python2-httplib2}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
|
||||||
%description -n python2-httplib2 %_description
|
%description -n python2-%{srcname} %{_description}
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%package -n python3-%{srcname}
|
||||||
%package -n python3-httplib2
|
Summary: %{summary}
|
||||||
Summary: A comprehensive HTTP client library
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
%description -n python3-httplib2
|
%description -n python3-%{srcname} %{_description}
|
||||||
A comprehensive HTTP client library that supports many features left out of
|
|
||||||
other HTTP libraries.
|
|
||||||
%endif
|
|
||||||
# with_python3
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n httplib2-%{version} -p1
|
%autosetup -n %{srcname}-%{version} -p1
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
|
||||||
%endif
|
|
||||||
# with_python3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
%py2_build
|
||||||
|
%py3_build
|
||||||
%if 0%{?with_python3}
|
|
||||||
pushd %{py3dir}
|
|
||||||
%{__python3} setup.py build
|
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
# with_python3
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%files -n python2-%{srcname}
|
||||||
pushd %{py3dir}
|
%{python2_sitelib}/%{srcname}-*.egg-info/
|
||||||
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%{python2_sitelib}/%{srcname}/
|
||||||
popd
|
|
||||||
%endif
|
|
||||||
# with_python3
|
|
||||||
|
|
||||||
%files -n python2-httplib2
|
%files -n python3-%{srcname}
|
||||||
%{python2_sitelib}/*
|
%{python3_sitelib}/%{srcname}-*.egg-info/
|
||||||
|
%{python3_sitelib}/%{srcname}/
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-httplib2
|
|
||||||
%{python3_sitelib}/*
|
|
||||||
%endif
|
|
||||||
# with_python3
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 22 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.17.3-2
|
||||||
|
- Cleanup spec
|
||||||
|
|
||||||
* Wed Apr 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.3-1
|
* Wed Apr 22 2020 Gwyn Ciesla <gwync@protonmail.com> - 0.17.3-1
|
||||||
- 0.17.3
|
- 0.17.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user