| |
@@ -1,4 +1,4 @@
|
| |
- %if 0%{?fedora}
|
| |
+ %if 0%{?fedora} || 0%{?rhel} >= 8
|
| |
%global with_python3 1
|
| |
%global py3dir ../python3
|
| |
%endif
|
| |
@@ -14,6 +14,10 @@
|
| |
Fedora Infrastructure Applications such as Bodhi, PackageDB, MirrorManager,\
|
| |
and FAS2.\
|
| |
|
| |
+ %if 0%{?fedora} || 0%{?rhel} >= 8
|
| |
+ %global py2 2
|
| |
+ %endif
|
| |
+
|
| |
|
| |
Name: python-fedora
|
| |
Version: 0.10.0
|
| |
@@ -25,58 +29,25 @@
|
| |
URL: https://github.com/fedora-infra/python-fedora
|
| |
Source0: https://github.com/fedora-infra/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
| |
|
| |
- BuildRequires: python-lockfile
|
| |
- BuildRequires: python-munch
|
| |
- BuildRequires: python-openid
|
| |
- BuildRequires: python-openid-cla
|
| |
- BuildRequires: python-openid-teams
|
| |
- BuildRequires: python2-devel
|
| |
+ BuildRequires: python%{?py2}-lockfile
|
| |
+ BuildRequires: python%{?py2}-munch
|
| |
+ BuildRequires: python%{?py2}-openid
|
| |
+ BuildRequires: python%{?py2}-openid-cla
|
| |
+ BuildRequires: python%{?py2}-openid-teams
|
| |
+ BuildRequires: python%{?py2}-devel
|
| |
|
| |
%if 0%{?rhel} == 6
|
| |
BuildRequires: python-sphinx10
|
| |
%else
|
| |
- %if 0%{?fedora} >= 24
|
| |
- BuildRequires: python2-sphinx
|
| |
- %else
|
| |
- BuildRequires: python-sphinx
|
| |
- %endif
|
| |
+ BuildRequires: python%{?py2}-sphinx
|
| |
%endif
|
| |
|
| |
- %if 0%{?fedora} || (0%{?rhel} >= 7)
|
| |
- BuildRequires: python-cherrypy2
|
| |
- %else
|
| |
- # Do not need TurboGears1 dependencies on epel7
|
| |
- %if 0%{?rhel} && 0%{?rhel} < 7
|
| |
- BuildRequires: python-cherrypy
|
| |
- %endif
|
| |
- %endif
|
| |
-
|
| |
- # Needed for tests and for the way we build docs
|
| |
- %if 0%{?rhel} && 0%{?rhel} < 7
|
| |
- # Phasing this out. First from epel7 and later for everything
|
| |
- BuildRequires: TurboGears
|
| |
- %endif
|
| |
-
|
| |
- %if 0%{?fedora} >= 24
|
| |
- BuildRequires: python2-babel
|
| |
- BuildRequires: python2-nose
|
| |
- BuildRequires: python2-requests >= 2.6.0
|
| |
- BuildRequires: python2-setuptools
|
| |
- %if 0%{?fedora} >= 26
|
| |
- BuildRequires: python2-kitchen
|
| |
- BuildRequires: python2-six
|
| |
- %else
|
| |
- BuildRequires: python-kitchen
|
| |
- BuildRequires: python-six
|
| |
- %endif
|
| |
- %else
|
| |
- BuildRequires: python-babel
|
| |
- BuildRequires: python-kitchen
|
| |
- BuildRequires: python-nose
|
| |
- BuildRequires: python-requests >= 2.6.0
|
| |
- BuildRequires: python-setuptools
|
| |
- BuildRequires: python-six
|
| |
- %endif
|
| |
+ BuildRequires: python%{?py2}-babel
|
| |
+ BuildRequires: python%{?py2}-nose
|
| |
+ BuildRequires: python%{?py2}-requests >= 2.6.0
|
| |
+ BuildRequires: python%{?py2}-setuptools
|
| |
+ BuildRequires: python%{?py2}-kitchen
|
| |
+ BuildRequires: python%{?py2}-six
|
| |
|
| |
%if 0%{?with_python3}
|
| |
BuildRequires: python3-babel
|
| |
@@ -100,31 +71,18 @@
|
| |
%package -n python2-fedora
|
| |
Summary: %{summary}
|
| |
|
| |
- Requires: python-beautifulsoup4
|
| |
- Requires: python-lockfile
|
| |
- Requires: python-munch
|
| |
+ Requires: python%{?py2}-beautifulsoup4
|
| |
+ Requires: python%{?py2}-lockfile
|
| |
+ Requires: python%{?py2}-munch
|
| |
# These are now optional dependencies. Some bodhi methods will not work if
|
| |
# they aren't installed but they aren't needed for most functionality of the
|
| |
# module.
|
| |
#Requires: koji python-iniparse yum
|
| |
|
| |
- %if 0%{?fedora} >= 24
|
| |
- Requires: python2-openidc-client
|
| |
- Requires: python2-requests >= 2.6.0
|
| |
- %if 0%{?fedora} >= 26
|
| |
- Requires: python2-kitchen
|
| |
- Requires: python2-six
|
| |
- %else
|
| |
- Requires: python-kitchen
|
| |
- Requires: python-six
|
| |
- %endif
|
| |
- %else
|
| |
- Requires: python-kitchen
|
| |
- Requires: python-openidc-client
|
| |
- Requires: python-requests >= 2.6.0
|
| |
- Requires: python-six
|
| |
- %endif
|
| |
-
|
| |
+ Requires: python%{?py2}-openidc-client
|
| |
+ Requires: python%{?py2}-requests >= 2.6.0
|
| |
+ Requires: python%{?py2}-kitchen
|
| |
+ Requires: python%{?py2}-six
|
| |
|
| |
%{?python_provide:%python_provide python2-fedora}
|
| |
|
| |
@@ -182,17 +140,8 @@
|
| |
Requires: python-feedparser
|
| |
Requires: python2-fedora = %{version}-%{release}
|
| |
|
| |
- %if 0%{?fedora} >= 24
|
| |
- Requires: python2-decorator
|
| |
- %if 0%{?fedora} >= 26
|
| |
- Requires: python2-sqlalchemy
|
| |
- %else
|
| |
- Requires: python-sqlalchemy
|
| |
- %endif
|
| |
- %else
|
| |
- Requires: python-decorator
|
| |
- Requires: python-sqlalchemy
|
| |
- %endif
|
| |
+ Requires: python%{?py2}-decorator
|
| |
+ Requires: python%{?py2}-sqlalchemy
|
| |
|
| |
%{?python_provide:%python_provide python2-fedora-turbogears}
|
| |
|
| |
@@ -210,17 +159,13 @@
|
| |
Summary: Python modules for flask applications authing to Fedora Account System
|
| |
License: LGPLv2+
|
| |
|
| |
- Requires: python-flask-wtf
|
| |
- Requires: python-openid
|
| |
- Requires: python-openid-cla
|
| |
- Requires: python-openid-teams
|
| |
+ Requires: python%{?py2}-flask-wtf
|
| |
+ Requires: python%{?py2}-openid
|
| |
+ Requires: python%{?py2}-openid-cla
|
| |
+ Requires: python%{?py2}-openid-teams
|
| |
Requires: python2-fedora = %{version}-%{release}
|
| |
|
| |
- %if 0%{?fedora} >= 25
|
| |
- Requires: python2-flask
|
| |
- %else
|
| |
- Requires: python-flask
|
| |
- %endif
|
| |
+ Requires: python%{?py2}-flask
|
| |
|
| |
%{?python_provide:%python_provide python2-fedora-flask}
|
| |
|
| |
@@ -244,9 +189,7 @@
|
| |
# https://bugzilla.redhat.com/show_bug.cgi?id=1329539
|
| |
rm -f python2/translations/{anp,bal,ilo,mai,nds,wba}.po
|
| |
|
| |
- # Pull in the old compat version of cherrypy to build the tg1 docs.
|
| |
cp python2/setup.py python2/setup_docs.py
|
| |
- sed -i 's/import sys/import sys\n__requires__ = ["CherryPy < 3.0"]; import pkg_resources/' python2/setup_docs.py
|
| |
|
| |
%if 0%{?with_python3}
|
| |
cp -a python2 python3
|
| |
@@ -321,8 +264,10 @@
|
| |
%{python2_sitelib}/fedora/
|
| |
%{python2_sitelib}/python_fedora*egg-info
|
| |
%exclude %{python2_sitelib}/fedora/tg/
|
| |
+ %if 0%{?rhel} != 6
|
| |
%exclude %{python2_sitelib}/fedora/tg2/
|
| |
%exclude %{python2_sitelib}/fedora/wsgi/
|
| |
+ %endif
|
| |
%exclude %{python2_sitelib}/flask_fas_openid.py*
|
| |
|
| |
%if 0%{?with_python3}
|
| |
Tested build for
f28
,f29
,f30
,master
,epel7
andel6
.Note: Drops the TurboGears dep on el6 entirely, because
TurboGears
depends onpython-sqlobject
which in turn depends on the unavailablepython-sqlite2
.Also drops some of the end-of-life Fedora release logic.