Drop python 2.
This commit is contained in:
parent
24ee1d14d2
commit
beea623b19
@ -3,16 +3,9 @@
|
||||
# Share doc between python- and python3-
|
||||
%global _docdir_fmt %{name}
|
||||
|
||||
|
||||
%if 0%{?fedora}
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 4.1.3
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: %{sum}
|
||||
|
||||
License: ASL 2.0
|
||||
@ -24,54 +17,8 @@ Patch2: keyring-remove.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: %{_bindir}/tox
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: pyOpenSSL
|
||||
BuildRequires: pytest
|
||||
BuildRequires: python-crypto
|
||||
BuildRequires: python-cryptography
|
||||
BuildRequires: python-django
|
||||
BuildRequires: python-fasteners
|
||||
BuildRequires: python-flask
|
||||
BuildRequires: python-gflags
|
||||
BuildRequires: python-httplib2
|
||||
BuildRequires: python-jsonpickle
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python-nose
|
||||
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
|
||||
%else
|
||||
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
|
||||
BuildRequires: python2-sqlalchemy
|
||||
BuildRequires: python2-unittest2
|
||||
BuildRequires: python2-webtest
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-fasteners
|
||||
@ -79,37 +26,10 @@ BuildRequires: python3-mock
|
||||
BuildRequires: python3-pyasn1 >= 0.1.7
|
||||
BuildRequires: python3-pyasn1-modules >= 0.0.5
|
||||
BuildRequires: python3-pytest
|
||||
%endif
|
||||
|
||||
%description
|
||||
This is a python client module for accessing resources protected by OAuth 2.0
|
||||
|
||||
%package -n python2-%{srcname}
|
||||
Summary: %{sum}
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
|
||||
|
||||
%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-pyOpenSSL
|
||||
Requires: python2-gflags
|
||||
%endif
|
||||
|
||||
%description -n python2-%{srcname}
|
||||
This is a python client module for accessing resources protected by OAuth 2.0
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{srcname}
|
||||
Summary: %{sum}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
@ -120,7 +40,6 @@ Requires: python3-fasteners
|
||||
|
||||
%description -n python3-%{srcname}
|
||||
This is a python client module for accessing resources protected by OAuth 2.0
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
@ -141,68 +60,40 @@ rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py
|
||||
rm oauth2client/contrib/keyring_storage.py tests/contrib/test_keyring_storage.py docs/source/oauth2client.contrib.keyring_storage.rst
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
popd
|
||||
%endif
|
||||
|
||||
%check
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
# Remove these to avoid py.test test collision.
|
||||
rm -rf build/lib/tests/
|
||||
# Remove these because django is weird on el7.
|
||||
rm -rf tests/contrib/django_util
|
||||
# Run the tests.
|
||||
py.test
|
||||
%else
|
||||
# Everything is fine on Fedora...
|
||||
tox -v --sitepackages -e py27
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
pushd %{py3dir}
|
||||
#tox -v --sitepackages -e py%%{python3_version_nodots}
|
||||
popd
|
||||
%endif
|
||||
|
||||
# We remove tests currently, we will ship them eventually
|
||||
# This is a bit of a hack until I package the test scripts in a separate package
|
||||
rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
|
||||
|
||||
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
||||
%{python2_sitelib}/%{srcname}
|
||||
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
||||
%{python3_sitelib}/%{srcname}
|
||||
%{python3_sitelib}/%{srcname}*.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Aug 24 2019 Gwyn Ciesla <gwync@protonmail.com> - 4.1.3-6
|
||||
- Drop Python 2.
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-5
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user