From 874b9c43429cfb68ac0418f0954ee2455ab868f3 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Feb 19 2019 12:30:31 +0000
Subject: Update spec file for python3 use


Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>

---

diff --git a/contrib/fedora/ipsilon.spec b/contrib/fedora/ipsilon.spec
index 56720ad..32016c8 100644
--- a/contrib/fedora/ipsilon.spec
+++ b/contrib/fedora/ipsilon.spec
@@ -2,7 +2,7 @@
 
 Name:       ipsilon
 Version:    2.1.0
-Release:    1%{?builddate}%{?gittag}%{?dist}
+Release:    2%{?builddate}%{?gittag}%{?dist}
 Summary:    An Identity Provider Server
 
 Group:      System Environment/Base
@@ -12,14 +12,14 @@ Source0:    https://fedorahosted.org/released/ipsilon/ipsilon-%{version}.tar.gz
 BuildArch:  noarch
 
 
-BuildRequires:  python2-devel
-BuildRequires:  python-setuptools
-BuildRequires:  lasso-python >= 2.5.0
-BuildRequires:  python-openid, python-openid-cla, python-openid-teams
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-lasso >= 2.5.0
+BuildRequires:  python3-openid, python3-openid-cla, python3-openid-teams
 BuildRequires:  m2crypto
 
-Requires:       python-setuptools
-Requires:       python-requests
+Requires:       python3-setuptools
+Requires:       python3-requests
 Requires:       %{name}-base = %{version}-%{release}
 
 %description
@@ -37,10 +37,10 @@ Requires:       mod_ssl
 Requires:       %{name}-filesystem = %{version}-%{release}
 Requires:       %{name}-provider = %{version}-%{release}
 Requires:       mod_wsgi
-Requires:       python-cherrypy
-Requires:       python-jinja2
-Requires:       python-lxml
-Requires:       python-sqlalchemy
+Requires:       python3-cherrypy
+Requires:       python3-jinja2
+Requires:       python3-lxml
+Requires:       python3-sqlalchemy
 Requires:       open-sans-fonts
 Requires:       fontawesome-fonts
 Requires:       pam
@@ -72,7 +72,7 @@ Requires:       %{name}-saml2-base = %{version}-%{release}
 Requires:       mod_auth_mellon >= 0.11.0
 Requires:       mod_auth_openidc
 Requires:       mod_ssl
-Requires:       python-requests
+Requires:       python3-requests
 BuildArch:      noarch
 
 %description client
@@ -87,10 +87,8 @@ Requires:       %{name}-authgssapi = %{version}-%{release}
 Requires:       %{name}-authform = %{version}-%{release}
 %if 0%{?rhel}
 Requires:       ipa-client
-Requires:       ipa-admintools
 %else
 Requires:       freeipa-client
-Requires:       freeipa-admintools
 %endif
 BuildArch:      noarch
 
@@ -102,8 +100,8 @@ Convenience client install tools for IPA support in the Ipsilon identity Provide
 Summary:        SAML2 base
 Group:          System Environment/Base
 License:        GPLv3+
-Requires:       lasso-python >= 2.5.0
-Requires:       python-lxml
+Requires:       python3-lasso >= 2.5.0
+Requires:       python3-lxml
 BuildArch:      noarch
 
 %description saml2-base
@@ -129,9 +127,9 @@ Group:          System Environment/Base
 License:        GPLv3+
 Provides:       ipsilon-provider = %{version}-%{release}
 Requires:       %{name} = %{version}-%{release}
-Requires:       python-openid
-Requires:       python-openid-cla
-Requires:       python-openid-teams
+Requires:       python3-openid
+Requires:       python3-openid-cla
+Requires:       python3-openid-teams
 BuildArch:      noarch
 
 %description openid
@@ -144,7 +142,7 @@ Group:          System Environment/Base
 License:        GPLv3+
 Provides:       ipsilon-provider = %{version}-%{release}
 Requires:       %{name} = %{version}-%{release}
-Requires:       python-jwcrypto
+Requires:       python3-jwcrypto
 BuildArch:      noarch
 
 %description openidc
@@ -171,7 +169,7 @@ Group:          System Environment/Base
 License:        GPLv3+
 Requires:       %{name} = %{version}-%{release}
 Requires:       %{name}-infofas = %{version}-%{release}
-Requires:       python-fedora
+Requires:       python3-fedora
 BuildArch:      noarch
 
 %description authfas
@@ -195,7 +193,7 @@ Summary:        PAM based login plugin
 Group:          System Environment/Base
 License:        GPLv3+
 Requires:       %{name} = %{version}-%{release}
-Requires:       python-pam
+Requires:       python3-pam
 BuildArch:      noarch
 
 %description authpam
@@ -220,7 +218,7 @@ Summary:        LDAP info and login plugin
 Group:          System Environment/Base
 License:        GPLv3+
 Requires:       %{name} = %{version}-%{release}
-Requires:       python-ldap
+Requires:       python3-ldap
 BuildArch:      noarch
 
 %description authldap
@@ -231,7 +229,7 @@ Summary:        Fedora Authentication System login plugin
 Group:          System Environment/Base
 License:        GPLv3+
 Requires:       %{name} = %{version}-%{release}
-Requires:       python-fedora
+Requires:       python3-fedora
 BuildArch:      noarch
 
 %description infofas
@@ -255,11 +253,11 @@ Provides an info plugin to allow retrieval via DBus and SSSD.
 
 
 %build
-CFLAGS="%{optflags}" %{__python} setup.py build
+CFLAGS="%{optflags}" %{__python3} setup.py build
 
 
 %install
-%{__python} setup.py install --skip-build --root %{buildroot}
+%{__python3} setup.py install --skip-build --root %{buildroot}
 mkdir -p %{buildroot}%{_sbindir}
 mkdir -p %{buildroot}%{_libexecdir}
 mkdir -p %{buildroot}%{_defaultdocdir}
@@ -272,7 +270,7 @@ mv %{buildroot}/%{_bindir}/ipsilon-db2conf %{buildroot}/%{_sbindir}
 mv %{buildroot}/%{_bindir}/ipsilon-server-install %{buildroot}/%{_sbindir}
 mv %{buildroot}/%{_bindir}/ipsilon-upgrade-database %{buildroot}/%{_sbindir}
 mv %{buildroot}%{_defaultdocdir}/%{name} %{buildroot}%{_defaultdocdir}/%{name}-%{version}
-rm -fr %{buildroot}%{python2_sitelib}/tests
+rm -fr %{buildroot}%{python3_sitelib}/tests
 ln -s %{_datadir}/fonts %{buildroot}%{_datadir}/ipsilon/ui/fonts
 
 mkdir -p  %{buildroot}%{_sysconfdir}/pam.d
@@ -309,12 +307,15 @@ fi
 %dir %{_datadir}/ipsilon
 %dir %{_datadir}/ipsilon/templates
 %dir %{_datadir}/ipsilon/templates/install
-%dir %{python2_sitelib}/ipsilon
-%{python2_sitelib}/ipsilon/__init__.py*
-%{python2_sitelib}/ipsilon-*.egg-info
-%dir %{python2_sitelib}/ipsilon/tools
-%{python2_sitelib}/ipsilon/tools/__init__.py*
-%{python2_sitelib}/ipsilon/tools/files.py*
+%dir %{python3_sitelib}/ipsilon
+%{python3_sitelib}/ipsilon/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/__init__.py
+%{python3_sitelib}/ipsilon-*.egg-info
+%dir %{python3_sitelib}/ipsilon/tools
+%{python3_sitelib}/ipsilon/tools/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/tools/__pycache__/files*.pyc
+%{python3_sitelib}/ipsilon/tools/__init__.py
+%{python3_sitelib}/ipsilon/tools/files.py
 
 %files
 %{_sbindir}/ipsilon-db2conf
@@ -322,30 +323,42 @@ fi
 %{_sbindir}/ipsilon-upgrade-database
 %{_datadir}/ipsilon/templates/install/*.conf
 %{_datadir}/ipsilon/ui/saml2sp
-%dir %{python2_sitelib}/ipsilon/helpers
-%{python2_sitelib}/ipsilon/helpers/common.py*
-%{python2_sitelib}/ipsilon/helpers/__init__.py*
+%dir %{python3_sitelib}/ipsilon/helpers
+%{python3_sitelib}/ipsilon/helpers/__pycache__/common*.pyc
+%{python3_sitelib}/ipsilon/helpers/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/helpers/common.py
+%{python3_sitelib}/ipsilon/helpers/__init__.py
 
 %files base
 %{_defaultdocdir}/%{name}-%{version}
-%{python2_sitelib}/ipsilon/admin
-%{python2_sitelib}/ipsilon/authz
-%{python2_sitelib}/ipsilon/rest
-%{python2_sitelib}/ipsilon/tools/dbupgrade.py*
-%dir %{python2_sitelib}/ipsilon/login
-%{python2_sitelib}/ipsilon/login/__init__*
-%{python2_sitelib}/ipsilon/login/common*
-%{python2_sitelib}/ipsilon/login/authtest*
-%dir %{python2_sitelib}/ipsilon/info
-%{python2_sitelib}/ipsilon/info/__init__*
-%{python2_sitelib}/ipsilon/info/common*
-%{python2_sitelib}/ipsilon/info/infonss*
-%dir %{python2_sitelib}/ipsilon/providers
-%{python2_sitelib}/ipsilon/providers/__init__*
-%{python2_sitelib}/ipsilon/providers/common*
-%{python2_sitelib}/ipsilon/root.py*
-%{python2_sitelib}/ipsilon/util
-%{python2_sitelib}/ipsilon/user
+%{python3_sitelib}/ipsilon/admin
+%{python3_sitelib}/ipsilon/authz
+%{python3_sitelib}/ipsilon/rest
+%{python3_sitelib}/ipsilon/tools/dbupgrade.py
+%{python3_sitelib}/ipsilon/tools/__pycache__/dbupgrade*.pyc
+%dir %{python3_sitelib}/ipsilon/login
+%{python3_sitelib}/ipsilon/login/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/login/__pycache__/common*.pyc
+%{python3_sitelib}/ipsilon/login/__pycache__/authtest*.pyc
+%{python3_sitelib}/ipsilon/login/__init__.py
+%{python3_sitelib}/ipsilon/login/common.py
+%{python3_sitelib}/ipsilon/login/authtest.py
+%dir %{python3_sitelib}/ipsilon/info
+%{python3_sitelib}/ipsilon/info/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/info/__pycache__/common*.pyc
+%{python3_sitelib}/ipsilon/info/__pycache__/infonss*.pyc
+%{python3_sitelib}/ipsilon/info/__init__.py
+%{python3_sitelib}/ipsilon/info/common.py
+%{python3_sitelib}/ipsilon/info/infonss.py
+%dir %{python3_sitelib}/ipsilon/providers
+%{python3_sitelib}/ipsilon/providers/__pycache__/__init__*.pyc
+%{python3_sitelib}/ipsilon/providers/__pycache__/common*.pyc
+%{python3_sitelib}/ipsilon/providers/__init__.py
+%{python3_sitelib}/ipsilon/providers/common.py
+%{python3_sitelib}/ipsilon/__pycache__/root*.pyc
+%{python3_sitelib}/ipsilon/root.py
+%{python3_sitelib}/ipsilon/util
+%{python3_sitelib}/ipsilon/user
 %{_mandir}/man*/ipsilon*
 %{_datadir}/ipsilon/templates/*.html
 %{_datadir}/ipsilon/templates/admin
@@ -373,53 +386,71 @@ fi
 %{_datadir}/ipsilon/templates/install/saml2
 
 %files tools-ipa
-%{python2_sitelib}/ipsilon/helpers/ipa.py*
+%{python3_sitelib}/ipsilon/helpers/__pycache__/ipa*.pyc
+%{python3_sitelib}/ipsilon/helpers/ipa.py
 
 %files saml2-base
-%{python2_sitelib}/ipsilon/tools/saml2metadata.py*
-%{python2_sitelib}/ipsilon/tools/certs.py*
+%{python3_sitelib}/ipsilon/tools/__pycache__/saml2metadata*.pyc
+%{python3_sitelib}/ipsilon/tools/__pycache__/certs*.pyc
+%{python3_sitelib}/ipsilon/tools/saml2metadata.py
+%{python3_sitelib}/ipsilon/tools/certs.py
 
 %files saml2
-%{python2_sitelib}/ipsilon/providers/saml2*
+%{python3_sitelib}/ipsilon/providers/__pycache__/saml2*.pyc
+%{python3_sitelib}/ipsilon/providers/saml2*
 %{_datadir}/ipsilon/templates/saml2
 
 %files openid
-%{python2_sitelib}/ipsilon/providers/openidp.py*
-%{python2_sitelib}/ipsilon/providers/openid/
+%{python3_sitelib}/ipsilon/providers/__pycache__/openidp*.pyc
+%{python3_sitelib}/ipsilon/providers/openidp.py
+%{python3_sitelib}/ipsilon/providers/openid/
 %{_datadir}/ipsilon/templates/openid/
 
 %files openidc
-%{python2_sitelib}/ipsilon/providers/openidcp.py*
-%{python2_sitelib}/ipsilon/providers/openidc/
+%{python3_sitelib}/ipsilon/providers/__pycache__/openidcp*.pyc
+%{python3_sitelib}/ipsilon/providers/openidcp.py
+%{python3_sitelib}/ipsilon/providers/openidc/
 %{_datadir}/ipsilon/templates/openidc/
 
 %files persona
-%{python2_sitelib}/ipsilon/providers/personaidp.py*
+%{python3_sitelib}/ipsilon/providers/__pycache__/personaidp*.pyc
+%{python3_sitelib}/ipsilon/providers/personaidp.py
 
 %files authfas
-%{python2_sitelib}/ipsilon/login/authfas*
+%{python3_sitelib}/ipsilon/login/__pycache__/authfas*.pyc
+%{python3_sitelib}/ipsilon/login/authfas.py
 
 %files authform
-%{python2_sitelib}/ipsilon/login/authform*
+%{python3_sitelib}/ipsilon/login/__pycache__/authform*.pyc
+%{python3_sitelib}/ipsilon/login/authform.py
 
 %files authpam
-%{python2_sitelib}/ipsilon/login/authpam*
+%{python3_sitelib}/ipsilon/login/__pycache__/authpam*.pyc
+%{python3_sitelib}/ipsilon/login/authpam.py
 
 %files authgssapi
-%{python2_sitelib}/ipsilon/login/authgssapi*
+%{python3_sitelib}/ipsilon/login/__pycache__/authgssapi*.pyc
+%{python3_sitelib}/ipsilon/login/authgssapi.py
 %{_datadir}/ipsilon/templates/login/gssapi.html
 
 %files authldap
-%{python2_sitelib}/ipsilon/login/authldap*
-%{python2_sitelib}/ipsilon/info/infoldap*
+%{python3_sitelib}/ipsilon/login/__pycache__/authldap*.pyc
+%{python3_sitelib}/ipsilon/login/authldap.py
+%{python3_sitelib}/ipsilon/info/__pycache__/infoldap*.pyc
+%{python3_sitelib}/ipsilon/info/infoldap.py
 
 %files infofas
-%{python2_sitelib}/ipsilon/info/infofas.*
+%{python3_sitelib}/ipsilon/info/__pycache__/infofas*.pyc
+%{python3_sitelib}/ipsilon/info/infofas.py
 
 %files infosssd
-%{python2_sitelib}/ipsilon/info/infosssd.*
+%{python3_sitelib}/ipsilon/info/__pycache__/infosssd*.pyc
+%{python3_sitelib}/ipsilon/info/infosssd.py
 
 %changelog
+* Tue Feb 19 2019 Alexander Bokovoy <abokovoy@redhat.com> - 2.1.0-2
+- Move to Python 3
+
 * Tue Nov 14 2017 Patrick Uiterwijk <puiterwijk@redhat.com> - 2.1.0-1
 - Release 2.1.0
 

