Projects
home:mollekopf:branches:Kolab:Winterfell
pykolab
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
pykolab.spec
Changed
@@ -2,11 +2,18 @@ #!BuildIgnore: systemd %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 +%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} +%else %global py2 2 +%{!?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 -%{!?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 +38,17 @@ %global kolabr_group kolab-r %global kolabr_group_id 414 + +%if 0%{?suse_version} +%global pythonmysql python-mysql +%else +%if 0%{?rhel} >= 8 +%global pythonmysql python3-PyMySQL +%else +%global pythonmysql MySQL-python +%endif +%endif + Summary: Kolab Groupware Solution Name: pykolab Version: 0.8.23 @@ -59,13 +77,7 @@ BuildRequires: gettext BuildRequires: glib2-devel BuildRequires: intltool - -%if 0%{?suse_version} -BuildRequires: python-mysql -%else -BuildRequires: MySQL-python -%endif - +BuildRequires: %{pythonmysql} BuildRequires: python%{?py2} BuildRequires: python%{?py2}-augeas BuildRequires: python%{?py2}-gnupg @@ -74,7 +86,6 @@ 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 %if 0%{?rhel} < 8 && 0%{?fedora} < 1 @@ -85,7 +96,8 @@ BuildRequires: python%{?py2}-sievelib BuildRequires: python%{?py2}-six BuildRequires: python%{?py2}-sqlalchemy -BuildRequires: python%{?py2}-twisted-core +#FIXME only used for unittests +#BuildRequires: python%{?py2}-twisted-core BuildRequires: python%{?py2}-tzlocal Requires: kolab-cli = %{version}-%{release} @@ -140,10 +152,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{?py2}-icalendar +Requires: python{?py2}-kolab +Requires: python{?py2}-kolabformat >= 0.5 +Requires: python{?py2}-tzlocal %description xml Kolab Format XML bindings wrapper for %{name} @@ -155,9 +167,9 @@ Summary: Kolab CLI components Group: Applications/System Requires: %{name} = %{version}-%{release} -Requires: python-augeas -Requires: python-cheetah -Requires: python-sqlalchemy +Requires: python{?py2}-augeas +Requires: python{?py2}-cheetah +Requires: python{?py2}-sqlalchemy %description -n kolab-cli Kolab CLI utilities @@ -171,7 +183,7 @@ Requires: %{name} = %{version}-%{release} Requires: cyrus-sasl Requires: cyrus-sasl-plain -Requires: python-sqlalchemy +Requires: python{?py2}-sqlalchemy %description -n kolab-saslauthd Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments @@ -198,12 +210,8 @@ %endif Requires: postfix Requires: %{name} = %{version}-%{release} -Requires: python-sqlalchemy -%if 0%{?suse_version} -Requires: python-mysql -%else -Requires: MySQL-python -%endif +Requires: python{?py2}-sqlalchemy +Requires: %{pythonmysql} %description -n postfix-kolab Kolab SMTP Access Policy for Postfix @@ -215,15 +223,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{?py2}-sqlalchemy +Requires: %{pythonmysql} +Requires: python{?py2}-gnupg +Requires: python{?py2}-icalendar >= 3.0 +Requires: python{?py2}-tzlocal Requires: %{name}-xml = %{version}-%{release} %description -n wallace @@ -232,8 +236,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 @@ -275,11 +292,11 @@ %find_lang pykolab %if 0%{?suse_version} -%fdupes %{buildroot}/%{python_sitelib} +%fdupes %{buildroot}/%{pykolab_python_sitelib} %endif %if 0%{?kolab_enterprise} -rm -rf %{buildroot}%{python_sitelib}/pykolab/setup/setup_manticore.py* +rm -rf %{buildroot}%{pykolab_python_sitelib}/pykolab/setup/setup_manticore.py* %endif %pre @@ -413,27 +430,34 @@ %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 -%{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 -%{python_sitelib}/pykolab/plugins/defaultfolders -%{python_sitelib}/pykolab/plugins/dynamicquota
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
.