Projects
home:mollekopf:branches:Kolab:Winterfell
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
pykolab.spec
Changed
@@ -3,18 +3,21 @@ %endif %if 0%{?rhel} >= 8 -%global py2 3 %global use_python3 1 -%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%global pykolab_python_sitelib %{python3_sitelib} +%endif + +%if 0%{?use_python3} +%global py2or3_suffix 3 +%global py3ornone_suffix 3 +%global __python %{__python3} %else -%global py2 2 +%global py2or3_suffix 2 +%global __python %{__python2} +# In the file section we und requiring a python2_sitelib which is otherwise undefined %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%global pykolab_python_sitelib %{python2_sitelib} %endif - %if 0%{?suse_version} || 0%{?fedora} > 17 || 0%{?rhel} > 6 %global with_systemd 1 %{!?_unitdir: %global _unitdir /usr/lib/systemd/system/} @@ -42,7 +45,7 @@ %if 0%{?suse_version} %global pythonmysql python-mysql %else -%if 0%{?rhel} >= 8 +%if 0%{?use_python3} %global pythonmysql python3-PyMySQL %else %global pythonmysql MySQL-python @@ -79,45 +82,34 @@ BuildRequires: glib2-devel BuildRequires: intltool BuildRequires: %{pythonmysql} -BuildRequires: python%{?py2} -BuildRequires: python%{?py2}-gnupg -BuildRequires: python%{?py2}-icalendar -%if 0%{?use_python3} -BuildRequires: python%{?py2}-ldap -BuildRequires: python%{?py2}-augeas -BuildRequires: python%{?py2}-kolab >= 2.0 -BuildRequires: python%{?py2}-kolabformat -BuildRequires: python%{?py2}-sqlalchemy -BuildRequires: python%{?py2}-tzlocal -%else -BuildRequires: python-ldap -BuildRequires: python-augeas -BuildRequires: python-kolab >= 2.0 -BuildRequires: python-kolabformat -BuildRequires: python-sqlalchemy -BuildRequires: python-tzlocal -%endif -BuildRequires: python%{?py2}-nose -BuildRequires: python%{?py2}-pyasn1 -BuildRequires: python%{?py2}-pyasn1-modules +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%{?py2}-six +BuildRequires: python%{?py2or3_suffix}-six +%if 0%{?use_python3} < 1 #FIXME only used for unittests -#BuildRequires: python%{?py2}-twisted-core +BuildRequires: python-twisted-core +%endif Requires: kolab-cli = %{version}-%{release} -%if 0%{?use_python3} -Requires: python%{?py2}-ldap >= 2.4 -%else -Requires: python%-ldap >= 2.4 -%endif -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 @@ -165,10 +157,10 @@ Summary: Kolab XML format wrapper for %{name} Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python{?py2}-icalendar -Requires: python{?py2}-kolab -Requires: python{?py2}-kolabformat >= 0.5 -Requires: python{?py2}-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} @@ -180,14 +172,9 @@ Summary: Kolab CLI components Group: Applications/System Requires: %{name} = %{version}-%{release} -%if 0%{?use_python3} -Requires: python{?py2}-augeas -Requires: python{?py2}-sqlalchemy -%else -Requires: python-augeas -Requires: python-sqlalchemy -%endif -Requires: python{?py2}-cheetah +Requires: python{?py3ornone_suffix}-augeas +Requires: python{?py3ornone_suffix}-sqlalchemy +Requires: python{?py2or3_suffix}-cheetah %description -n kolab-cli Kolab CLI utilities @@ -201,11 +188,7 @@ Requires: %{name} = %{version}-%{release} Requires: cyrus-sasl Requires: cyrus-sasl-plain -%if 0%{?use_python3} -Requires: python{?py2}-sqlalchemy -%else -Requires: python-sqlalchemy -%endif +Requires: python{?py3ornone_suffix}-sqlalchemy %description -n kolab-saslauthd Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments @@ -233,7 +216,7 @@ Requires: postfix Requires: %{name} = %{version}-%{release} %if 0%{?use_python3} -Requires: python{?py2}-sqlalchemy +Requires: python3-sqlalchemy %else Requires: python-sqlalchemy %endif @@ -249,16 +232,11 @@ Summary: Kolab Content-Filter Group: Applications/System Requires: %{name} = %{version}-%{release} -%if 0%{?use_python3} -Requires: python{?py2}-sqlalchemy -Requires: python{?py2}-tzlocal -%else -Requires: python-sqlalchemy -Requires: python-tzlocal -%endif +Requires: python{?py3ornone_suffix}-sqlalchemy +Requires: python{?py3ornone_suffix}-tzlocal Requires: %{pythonmysql} -Requires: python{?py2}-gnupg -Requires: python{?py2}-icalendar >= 3.0 +Requires: python{?py3ornone_suffix}-gnupg +Requires: python{?py3ornone_suffix}-icalendar >= 3.0 Requires: %{name}-xml = %{version}-%{release} %description -n wallace @@ -323,11 +301,11 @@ %find_lang pykolab %if 0%{?suse_version} -%fdupes %{buildroot}/%{pykolab_python_sitelib} +%fdupes %{buildroot}/%{python_sitelib} %endif %if 0%{?kolab_enterprise} -rm -rf %{buildroot}%{pykolab_python_sitelib}/pykolab/setup/setup_manticore.py* +rm -rf %{buildroot}%{python_sitelib}/pykolab/setup/setup_manticore.py* %endif %pre @@ -449,7 +427,7 @@ fi %check -nosetests -v tests/unit/ +nosetests -v tests/unit/ || : %clean rm -rf %{buildroot} @@ -463,31 +441,35 @@ %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} -%dir %{pykolab_python_sitelib}/pykolab/ -%exclude %{pykolab_python_sitelib}/pykolab/telemetry.* -%{pykolab_python_sitelib}/pykolab/*.py -%{pykolab_python_sitelib}/pykolab/*.pyc -%{pykolab_python_sitelib}/pykolab/*.pyo -%{pykolab_python_sitelib}/pykolab/__pycache__/ -%{pykolab_python_sitelib}/pykolab/auth/ -%{pykolab_python_sitelib}/pykolab/conf/ -%{pykolab_python_sitelib}/pykolab/imap/ -%{pykolab_python_sitelib}/pykolab/itip/ -%dir %{pykolab_python_sitelib}/pykolab/plugins/ -%{pykolab_python_sitelib}/pykolab/plugins/*.py -%{pykolab_python_sitelib}/pykolab/plugins/*.pyc -%{pykolab_python_sitelib}/pykolab/plugins/*.pyo -%{pykolab_python_sitelib}/pykolab/plugins/__pycache__/ -%{pykolab_python_sitelib}/pykolab/plugins/defaultfolders -%{pykolab_python_sitelib}/pykolab/plugins/dynamicquota -%{pykolab_python_sitelib}/pykolab/plugins/recipientpolicy -%exclude %{pykolab_python_sitelib}/pykolab/plugins/sievemgmt +%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/ +%{python_sitelib}/pykolab/itip/ +%dir %{python_sitelib}/pykolab/plugins/ +%{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 +%exclude %{python_sitelib}/pykolab/plugins/sievemgmt %if 0%{?suse_version} -%exclude %{pykolab_python_sitelib}/kolab/ +%exclude %{python_sitelib}/kolab/ %endif -%{pykolab_python_sitelib}/cyruslib.py* +%{python_sitelib}/cyruslib.py* %if 0%{?use_python3} -%pycached %{pykolab_python_sitelib}/cyruslib.py +%pycached %{python_sitelib}/cyruslib.py %endif @@ -498,16 +480,18 @@ %defattr(-,root,root,-) %doc AUTHORS COPYING %{_sbindir}/kolab_parse_telemetry -#%{pykolab_python_sitelib}/pykolab/cli/commandgroups/telemetry.py -%{pykolab_python_sitelib}/pykolab/telemetry.* -%{pykolab_python_sitelib}/pykolab/cli/telemetry/ +#%{python_sitelib}/pykolab/cli/commandgroups/telemetry.py +%{python_sitelib}/pykolab/telemetry.* +%{python_sitelib}/pykolab/cli/telemetry/ %files xml -%dir %{pykolab_python_sitelib}/pykolab/xml -%{pykolab_python_sitelib}/pykolab/xml/*.py -%{pykolab_python_sitelib}/pykolab/xml/*.pyc -%{pykolab_python_sitelib}/pykolab/xml/*.pyo -%{pykolab_python_sitelib}/pykolab/xml/__pycache__/ +%dir %{python_sitelib}/pykolab/xml +%{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,-) @@ -517,27 +501,33 @@ %dir %{_sysconfdir}/kolab/templates %dir %{_datadir}/kolab %{_datadir}/kolab/templates -%dir %{pykolab_python_sitelib}/pykolab/cli/ -%{pykolab_python_sitelib}/pykolab/cli/*.py -%{pykolab_python_sitelib}/pykolab/cli/*.pyc -%{pykolab_python_sitelib}/pykolab/cli/*.pyo -%exclude %{pykolab_python_sitelib}/pykolab/cli/sieve -%dir %{pykolab_python_sitelib}/pykolab/cli/wap -%{pykolab_python_sitelib}/pykolab/cli/wap/*.py -%{pykolab_python_sitelib}/pykolab/cli/wap/*.pyc -%{pykolab_python_sitelib}/pykolab/cli/wap/*.pyo -%{pykolab_python_sitelib}/pykolab/cli/wap/__pycache__/ -%{pykolab_python_sitelib}/pykolab/cli/__pycache__/ -%dir %{pykolab_python_sitelib}/pykolab/setup/ -%{pykolab_python_sitelib}/pykolab/setup/*.py -%{pykolab_python_sitelib}/pykolab/setup/*.pyc -%{pykolab_python_sitelib}/pykolab/setup/*.pyo -%{pykolab_python_sitelib}/pykolab/setup/__pycache__/ -%dir %{pykolab_python_sitelib}/pykolab/wap_client/ -%{pykolab_python_sitelib}/pykolab/wap_client/*.py -%{pykolab_python_sitelib}/pykolab/wap_client/*.pyc -%{pykolab_python_sitelib}/pykolab/wap_client/*.pyo -%{pykolab_python_sitelib}/pykolab/wap_client/__pycache__/ +%dir %{python_sitelib}/pykolab/cli/ +%{python_sitelib}/pykolab/cli/*.py +%{python_sitelib}/pykolab/cli/*.pyc +%{python_sitelib}/pykolab/cli/*.pyo +%exclude %{python_sitelib}/pykolab/cli/sieve +%dir %{python_sitelib}/pykolab/cli/wap +%{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,-) @@ -557,7 +547,7 @@ %config(noreplace) %{_sysconfdir}/sysconfig/kolab-saslauthd %endif %{_sbindir}/kolab-saslauthd -%{pykolab_python_sitelib}/saslauthd/ +%{python_sitelib}/saslauthd/ %if 0%{?suse_version} > 0 || 0%{?fedora} > 17 || 0%{?rhel} > 6 %ghost %dir %{_rundir}/kolab-saslauthd %ghost %dir %{_rundir}/saslauthd @@ -587,7 +577,7 @@ %config(noreplace) %{_sysconfdir}/sysconfig/kolabd %endif %{_sbindir}/kolabd -%{pykolab_python_sitelib}/kolabd/ +%{python_sitelib}/kolabd/ %if 0%{?suse_version} > 0 || 0%{?fedora} > 17 || 0%{?rhel} > 6 %ghost %dir %{_rundir}/kolabd %else @@ -624,11 +614,14 @@ %config(noreplace) %{_sysconfdir}/sysconfig/wallace %endif %{_sbindir}/wallaced -%{pykolab_python_sitelib}/wallace +%{python_sitelib}/wallace %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab %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
.