Projects
Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 95
View file
pykolab.spec
Changed
@@ -2,11 +2,19 @@ #!BuildIgnore: systemd %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global py2 2 +%if 0%{?rhel} >= 8 +%global use_python3 1 +%endif + +%if 0%{?use_python3} +%global py2or3_suffix 3 +%global py3ornone_suffix 3 +%global __python %{__python3} +%else +%global py2or3_suffix 2 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif -%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %if 0%{?suse_version} || 0%{?fedora} > 17 || 0%{?rhel} > 6 %global with_systemd 1 @@ -31,6 +39,17 @@ %global kolabr_group kolab-r %global kolabr_group_id 414 + +%if 0%{?suse_version} +%global pythonmysql python-mysql +%else +%if 0%{?use_python3} +%global pythonmysql python3-PyMySQL +%else +%global pythonmysql MySQL-python +%endif +%endif + Summary: Kolab Groupware Solution Name: pykolab Version: 0.8.23 @@ -55,44 +74,40 @@ BuildRequires: future %endif + BuildRequires: gcc BuildRequires: gettext BuildRequires: glib2-devel BuildRequires: intltool - -%if 0%{?suse_version} -BuildRequires: python-mysql -%else -BuildRequires: MySQL-python -%endif - -BuildRequires: python%{?py2} -BuildRequires: python%{?py2}-augeas -BuildRequires: python%{?py2}-gnupg -BuildRequires: python%{?py2}-icalendar -BuildRequires: python%{?py2}-kolab >= 2.0 -BuildRequires: python%{?py2}-kolabformat -BuildRequires: python%{?py2}-ldap -BuildRequires: python%{?py2}-nose -BuildRequires: python%{?py2}-pep8 -BuildRequires: python%{?py2}-pyasn1 -BuildRequires: python%{?py2}-pyasn1-modules +BuildRequires: %{pythonmysql} +BuildRequires: python%{?py3ornone_suffix} +BuildRequires: python%{?py3ornone_suffix}-gnupg +BuildRequires: python%{?py3ornone_suffix}-icalendar +BuildRequires: python%{?py3ornone_suffix}-ldap +BuildRequires: python%{?py3ornone_suffix}-augeas +BuildRequires: python%{?py3ornone_suffix}-kolab >= 2.0 +BuildRequires: python%{?py3ornone_suffix}-kolabformat +BuildRequires: python%{?py3ornone_suffix}-sqlalchemy +BuildRequires: python%{?py3ornone_suffix}-tzlocal +BuildRequires: python%{?py2or3_suffix}-nose +BuildRequires: python%{?py2or3_suffix}-pyasn1 +BuildRequires: python%{?py2or3_suffix}-pyasn1-modules %if 0%{?rhel} < 8 && 0%{?fedora} < 1 BuildRequires: pytz %else -BuildRequires: python%{?py2}-pytz +BuildRequires: python%{?py2or3_suffix}-pytz +%endif +BuildRequires: python%{?py2or3_suffix}-six +%if 0%{?use_python3} < 1 +#FIXME only used for unittests +BuildRequires: python-twisted-core %endif -BuildRequires: python%{?py2}-sievelib -BuildRequires: python%{?py2}-six -BuildRequires: python%{?py2}-sqlalchemy -BuildRequires: python%{?py2}-twisted-core -BuildRequires: python%{?py2}-tzlocal Requires: kolab-cli = %{version}-%{release} -Requires: python%{?py2}-ldap >= 2.4 -Requires: python%{?py2}-pyasn1 -Requires: python%{?py2}-pyasn1-modules -Requires: python%{?py2}-six +Requires: python%{?py3ornone_suffix}-ldap >= 2.4 +Requires: python%{?py2or3_suffix}-pyasn1 +Requires: python%{?py2or3_suffix}-pyasn1-modules +Requires: python%{?py2or3_suffix}-six Requires(pre): /usr/sbin/useradd Requires(pre): /usr/sbin/usermod Requires(pre): /usr/sbin/groupadd @@ -140,10 +155,10 @@ Summary: Kolab XML format wrapper for %{name} Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-icalendar -Requires: python-kolab -Requires: python-kolabformat >= 0.5 -Requires: python-tzlocal +Requires: python{?py3ornone_suffix}-icalendar +Requires: python{?py3ornone_suffix}-kolab +Requires: python{?py3ornone_suffix}-kolabformat >= 0.5 +Requires: python{?py3ornone_suffix}-tzlocal %description xml Kolab Format XML bindings wrapper for %{name} @@ -155,9 +170,9 @@ Summary: Kolab CLI components Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-augeas -Requires: python-cheetah -Requires: python-sqlalchemy +Requires: python{?py3ornone_suffix}-augeas +Requires: python{?py3ornone_suffix}-sqlalchemy +Requires: python{?py2or3_suffix}-cheetah %description -n kolab-cli Kolab CLI utilities @@ -171,7 +186,7 @@ Requires: %{name} = %{version}-%{release} Requires: cyrus-sasl Requires: cyrus-sasl-plain -Requires: python-sqlalchemy +Requires: python{?py3ornone_suffix}-sqlalchemy %description -n kolab-saslauthd Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments @@ -198,12 +213,12 @@ %endif Requires: postfix Requires: %{name} = %{version}-%{release} -Requires: python-sqlalchemy -%if 0%{?suse_version} -Requires: python-mysql +%if 0%{?use_python3} +Requires: python3-sqlalchemy %else -Requires: MySQL-python +Requires: python-sqlalchemy %endif +Requires: %{pythonmysql} %description -n postfix-kolab Kolab SMTP Access Policy for Postfix @@ -215,15 +230,11 @@ Summary: Kolab Content-Filter Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-sqlalchemy -%if 0%{?suse_version} -Requires: python-mysql -%else -Requires: MySQL-python -%endif -Requires: python-gnupg -Requires: python-icalendar >= 3.0 -Requires: python-tzlocal +Requires: python{?py3ornone_suffix}-sqlalchemy +Requires: python{?py3ornone_suffix}-tzlocal +Requires: %{pythonmysql} +Requires: python{?py3ornone_suffix}-gnupg +Requires: python{?py3ornone_suffix}-icalendar >= 3.0 Requires: %{name}-xml = %{version}-%{release} %description -n wallace @@ -232,8 +243,21 @@ %prep %setup -q +%if 0%{?use_python3} +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' kolabd.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' saslauthd.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' conf.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' setup-kolab.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' wallace.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' kolab-cli.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' bin/kolab_parse_telemetry.py +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|g' bin/kolab_smtp_access_policy.py +%endif + + %build autoreconf -v || automake --add-missing && autoreconf -v + %configure %install @@ -401,7 +425,7 @@ fi %check -nosetests -v tests/unit/ ||: +nosetests -v tests/unit/ || : %clean rm -rf %{buildroot} @@ -413,11 +437,16 @@ %attr(0750,kolab-n,kolab) %dir %{_sysconfdir}/kolab %attr(0640,kolab-n,kolab) %config(noreplace) %{_sysconfdir}/kolab/kolab.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} + + %dir %{python_sitelib}/pykolab/ %exclude %{python_sitelib}/pykolab/telemetry.* %{python_sitelib}/pykolab/*.py %{python_sitelib}/pykolab/*.pyc %{python_sitelib}/pykolab/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/__pycache__/ +%endif %{python_sitelib}/pykolab/auth/ %{python_sitelib}/pykolab/conf/ %{python_sitelib}/pykolab/imap/ @@ -426,6 +455,9 @@ %{python_sitelib}/pykolab/plugins/*.py %{python_sitelib}/pykolab/plugins/*.pyc %{python_sitelib}/pykolab/plugins/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/plugins/__pycache__/ +%endif %{python_sitelib}/pykolab/plugins/defaultfolders %{python_sitelib}/pykolab/plugins/dynamicquota %{python_sitelib}/pykolab/plugins/recipientpolicy @@ -434,6 +466,11 @@ %exclude %{python_sitelib}/kolab/ %endif %{python_sitelib}/cyruslib.py* +%if 0%{?use_python3} +%pycached %{python_sitelib}/cyruslib.py +%endif + + %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/lib/kolab/ %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/log/kolab/ @@ -450,6 +487,9 @@ %{python_sitelib}/pykolab/xml/*.py %{python_sitelib}/pykolab/xml/*.pyc %{python_sitelib}/pykolab/xml/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/xml/__pycache__/ +%endif %files -n kolab-cli %defattr(-,root,root,-) @@ -468,14 +508,24 @@ %{python_sitelib}/pykolab/cli/wap/*.py %{python_sitelib}/pykolab/cli/wap/*.pyc %{python_sitelib}/pykolab/cli/wap/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/cli/wap/__pycache__/ +%{python_sitelib}/pykolab/cli/__pycache__/ +%endif %dir %{python_sitelib}/pykolab/setup/ %{python_sitelib}/pykolab/setup/*.py %{python_sitelib}/pykolab/setup/*.pyc %{python_sitelib}/pykolab/setup/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/setup/__pycache__/ +%endif %dir %{python_sitelib}/pykolab/wap_client/ %{python_sitelib}/pykolab/wap_client/*.py %{python_sitelib}/pykolab/wap_client/*.pyc %{python_sitelib}/pykolab/wap_client/*.pyo +%if 0%{?use_python3} +%{python_sitelib}/pykolab/wap_client/__pycache__/ +%endif %files -n kolab-saslauthd %defattr(-,root,root,-) @@ -567,6 +617,9 @@ %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace %changelog +* Tue Aug 2 2022 Christian Mollekopf <mollekopf@apheleia-it.ch> - 0.8.23-2 +- Python3 support on centos 8 + * Tue Feb 8 2022 Jeroen van Meeuwen <vanmeeuwen@apheleia-it.ch> - 0.8.23-1 - Release of version 0.8.23
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.