diff --git a/fix_pip_version.patch b/fix_pip_version.patch new file mode 100644 index 0000000..60aedee --- /dev/null +++ b/fix_pip_version.patch @@ -0,0 +1,14 @@ +--- a/setup.py ++++ b/setup.py +@@ -12,7 +12,10 @@ from __future__ import unicode_literals + + import io + from os import path +-from pip.req import parse_requirements ++try: # for pip >= 10 ++ from pip._internal.req import parse_requirements ++except ImportError: ++ from pip.req import parse_requirements + from setuptools import setup, find_packages + + diff --git a/python-sievelib.changes b/python-sievelib.changes index db24c92..eed3fef 100644 --- a/python-sievelib.changes +++ b/python-sievelib.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon May 28 14:38:41 UTC 2018 - mcepl@suse.com + +- clean up SPEC file +- allow installation with spectools in openSUSE repo + fix_pip_version.patch +- upgrade to 1.1.1: + * Various minor clean up + * added support for RFC3894. + * added tests + * Python 3 compatibility + * provide support for non-IPv4 connections + +------------------------------------------------------------------- +Thu Aug 24 13:54:39 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Tue Feb 16 08:55:04 UTC 2016 - aj@ajaissle.de @@ -23,3 +41,4 @@ Wed Apr 1 11:44:09 UTC 2015 - aj@ajaissle.de - Initial package, sievelib v0.8 + diff --git a/python-sievelib.spec b/python-sievelib.spec index 10732b7..8e65497 100644 --- a/python-sievelib.spec +++ b/python-sievelib.spec @@ -1,6 +1,7 @@ # # spec file for package python-sievelib # +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 Aeneas Jaissle # # All modifications and additions to the file contributed by third parties @@ -17,24 +18,24 @@ %define modname sievelib +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{modname} -Version: 0.9.2 +Version: 1.1.1 Release: 0 Summary: Client-side Sieve and Managesieve library written in Python License: MIT Group: Development/Languages/Python - -Url: https://pypi.python.org/pypi/sievelib -Source: https://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz - -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +URL: https://pypi.python.org/pypi/sievelib +Source: https://files.pythonhosted.org/packages/source/s/sievelib/%{modname}-%{version}.tar.gz +Patch0: fix_pip_version.patch +BuildRequires: %{python_module future} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module six} +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildArch: noarch -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools +%python_subpackages %description Client-side Sieve and Managesieve library written in Python. @@ -43,16 +44,21 @@ Client-side Sieve and Managesieve library written in Python. %prep %setup -q -n %{modname}-%{version} +%patch0 -p1 +sed -i -e '/^#!\/usr\/bin.*python/d' sievelib/parser.py +chmod -x sievelib/parser.py %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files -%defattr(-,root,root,-) -%doc COPYING README.rst +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%files %{python_files} +%license COPYING +%doc README.rst %{python_sitelib}/* %changelog diff --git a/sievelib-0.9.2.tar.gz b/sievelib-0.9.2.tar.gz deleted file mode 100644 index f934b8a..0000000 --- a/sievelib-0.9.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71abebdc069a2597f2d0354348c1afc967ec6bebe0d6e7228489d8efea56060b -size 25710 diff --git a/sievelib-1.1.1.tar.gz b/sievelib-1.1.1.tar.gz new file mode 100644 index 0000000..e73dcbf --- /dev/null +++ b/sievelib-1.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf1e684881483e33d4c37687d147ebbe85bd09fc3b0b6c7366aac992b97581ea +size 29647