Don't ship docs, use python2 names to declare Python 2 dependencies
Docs cannot be built on Python 2: No Sphinx Docs cannot be built on Python 3: Too fresh Django version
This commit is contained in:
parent
bbfcb0e8fe
commit
7a1d40717c
@ -12,7 +12,7 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 4.1.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: %{sum}
|
||||
|
||||
License: ASL 2.0
|
||||
@ -25,39 +25,49 @@ Patch2: keyring-remove.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: %{_bindir}/tox
|
||||
BuildRequires: python2-devel
|
||||
# Needed for docs build
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: pyOpenSSL
|
||||
BuildRequires: pytest
|
||||
BuildRequires: python-crypto
|
||||
BuildRequires: python2-django1.11
|
||||
BuildRequires: python-jsonpickle
|
||||
BuildRequires: python-cryptography
|
||||
BuildRequires: python-django
|
||||
BuildRequires: python-fasteners
|
||||
BuildRequires: python-flask
|
||||
BuildRequires: python2-gflags
|
||||
BuildRequires: python-gflags
|
||||
BuildRequires: python-httplib2
|
||||
BuildRequires: python-jsonpickle
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python2-pyasn1 >= 0.1.7
|
||||
BuildRequires: python2-pyasn1-modules >= 0.0.5
|
||||
BuildRequires: python-pyasn1-modules >= 0.0.5
|
||||
BuildRequires: python-pyasn1 >= 0.1.7
|
||||
BuildRequires: python-rsa >= 3.1.4
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six >= 1.6.1
|
||||
BuildRequires: python-sqlalchemy
|
||||
BuildRequires: python-unittest2
|
||||
BuildRequires: python-webtest
|
||||
|
||||
BuildRequires: pytest
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-fasteners
|
||||
BuildRequires: python-six >= 1.6.1
|
||||
%else
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-crypto
|
||||
BuildRequires: python2-cryptography
|
||||
BuildRequires: python2-django1.11
|
||||
BuildRequires: python2-fasteners
|
||||
BuildRequires: python2-flask
|
||||
BuildRequires: python2-gflags
|
||||
BuildRequires: python2-httplib2
|
||||
BuildRequires: python2-jsonpickle
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-nose
|
||||
BuildRequires: python2-pyasn1-modules >= 0.0.5
|
||||
BuildRequires: python2-pyasn1 >= 0.1.7
|
||||
BuildRequires: python2-pyOpenSSL
|
||||
BuildRequires: python2-pytest
|
||||
BuildRequires: python2-rsa >= 3.1.4
|
||||
BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-six >= 1.6.1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora}
|
||||
# RHEL 7 has too old a version of python-sphinx
|
||||
BuildRequires: python-sphinx > 1.3
|
||||
BuildRequires: python-sphinx_rtd_theme
|
||||
BuildRequires: python2-sqlalchemy
|
||||
BuildRequires: python2-unittest2
|
||||
BuildRequires: python2-webtest
|
||||
%endif
|
||||
|
||||
|
||||
@ -78,20 +88,21 @@ This is a python client module for accessing resources protected by OAuth 2.0
|
||||
Summary: %{sum}
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
|
||||
Requires: pyOpenSSL
|
||||
Requires: python2-gflags
|
||||
Requires: python-httplib2
|
||||
Requires: python2-pyasn1 >= 0.1.7
|
||||
Requires: python2-pyasn1-modules >= 0.0.5
|
||||
Requires: python-rsa >= 3.1.4
|
||||
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: python-fasteners
|
||||
Requires: python-six >= 1.6.1
|
||||
Requires: pyOpenSSL
|
||||
Requires: python-gflags
|
||||
Requires: python-httplib2
|
||||
Requires: python-pyasn1 >= 0.1.7
|
||||
Requires: python-pyasn1-modules >= 0.0.5
|
||||
Requires: python-rsa >= 3.1.4
|
||||
%else
|
||||
# the rest is generated from upstream metadata
|
||||
Requires: python2-fasteners
|
||||
Requires: python2-six >= 1.6.1
|
||||
Requires: python2-pyOpenSSL
|
||||
Requires: python2-gflags
|
||||
%endif
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
@ -106,23 +117,11 @@ Summary: %{sum}
|
||||
Requires: python3-pyOpenSSL
|
||||
Requires: python3-gflags
|
||||
Requires: python3-fasteners
|
||||
Requires: python3-httplib2 >= 0.9.1
|
||||
Requires: python3-pyasn1 >= 0.1.7
|
||||
Requires: python3-pyasn1-modules >= 0.0.5
|
||||
Requires: python3-rsa >= 3.1.4
|
||||
Requires: python3-six >= 1.6.1
|
||||
|
||||
%description -n python3-%{srcname}
|
||||
This is a python client module for accessing resources protected by OAuth 2.0
|
||||
%endif
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for python oauth2client
|
||||
|
||||
%description doc
|
||||
The python-oauth2client-doc package provides the documentation
|
||||
for the package. Documentation is shipped in html format.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
%patch0 -p1 -b .doc
|
||||
@ -150,19 +149,6 @@ cp -a . %{py3dir}
|
||||
%build
|
||||
%py2_build
|
||||
|
||||
%if 0%{?fedora}
|
||||
export PYTHONPATH=`pwd`
|
||||
pushd docs
|
||||
# Not running with smp_flags as sometimes sphinx fails when run
|
||||
# with parallel make
|
||||
make html
|
||||
popd
|
||||
unset PYTHONPATH
|
||||
rm -vr docs/_build/html/_sources
|
||||
rm -vr docs/_build/html/_static/fonts
|
||||
rm -v docs/_build/html/{.buildinfo,objects.inv}
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%py3_build
|
||||
@ -208,11 +194,6 @@ rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
|
||||
%{python2_sitelib}/%{srcname}
|
||||
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
|
||||
|
||||
%if 0%{?fedora}
|
||||
%files doc
|
||||
%doc docs/_build/html
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE
|
||||
@ -222,6 +203,9 @@ rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 30 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-3
|
||||
- Don't ship docs, use python2 names to declare Python 2 dependencies
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user