Control: tags 960577 + patch Control: tags 960577 + pending Dear maintainer,
I've prepared an NMU for python-sievelib (versioned as 1.1.1-3.2) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru python-sievelib-1.1.1/debian/changelog python-sievelib-1.1.1/debian/changelog --- python-sievelib-1.1.1/debian/changelog 2020-03-07 20:52:38.000000000 +0200 +++ python-sievelib-1.1.1/debian/changelog 2020-07-06 14:47:15.000000000 +0300 @@ -1,3 +1,10 @@ +python-sievelib (1.1.1-3.2) unstable; urgency=low + + * Non-maintainer upload. + * Backport upstream build fixes. (Closes: #960577) + + -- Adrian Bunk <b...@debian.org> Mon, 06 Jul 2020 14:47:15 +0300 + python-sievelib (1.1.1-3.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru python-sievelib-1.1.1/debian/patches/0001-Fix-import-of-req-module-from-pip-10.patch python-sievelib-1.1.1/debian/patches/0001-Fix-import-of-req-module-from-pip-10.patch --- python-sievelib-1.1.1/debian/patches/0001-Fix-import-of-req-module-from-pip-10.patch 2020-03-07 20:52:38.000000000 +0200 +++ python-sievelib-1.1.1/debian/patches/0001-Fix-import-of-req-module-from-pip-10.patch 2020-07-06 14:44:06.000000000 +0300 @@ -1,28 +1,33 @@ -From: Michael Fladischer <fladischermich...@fladi.at> -Date: Thu, 7 Feb 2019 10:47:07 +0100 -Subject: Fix import of req module from pip (>= 10). +From 1deef0e2bf039a0e817ea6f19aaf1947dc9fafbc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fernando=20Tricas=20Garc=C3=ADa?= + <ferna...@elmundoesimperfecto.com> +Date: Fri, 31 Aug 2018 17:11:58 +0200 +Subject: Problems with pip >=10 and pip.req (#72) +Hello, + +it seems that pip 10 does not allow the use of pip.req (https://stackoverflow.com/questions/25192794/no-module-named-pip-req). +I've tested with this workaround and it seems to work well. --- - setup.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) + setup.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py -index 0d28fed..4fb9794 100644 +index 0d28fed..784608d 100644 --- a/setup.py +++ b/setup.py -@@ -12,9 +12,14 @@ from __future__ import unicode_literals +@@ -12,7 +12,10 @@ from __future__ import unicode_literals import io from os import path -from pip.req import parse_requirements - from setuptools import setup, find_packages - -+# From https://stackoverflow.com/a/49867265 -+try: # for pip >= 10 ++try: # for pip >= 10 (From: https://stackoverflow.com/questions/25192794/no-module-named-pip-req) + from pip._internal.req import parse_requirements +except ImportError: # for pip <= 9.0.3 + from pip.req import parse_requirements -+ + from setuptools import setup, find_packages + - def get_requirements(requirements_file): - """Use pip to parse requirements file.""" +-- +2.20.1 + diff -Nru python-sievelib-1.1.1/debian/patches/0001-Put-the-list-of-requirements-in-setup.py.patch python-sievelib-1.1.1/debian/patches/0001-Put-the-list-of-requirements-in-setup.py.patch --- python-sievelib-1.1.1/debian/patches/0001-Put-the-list-of-requirements-in-setup.py.patch 1970-01-01 02:00:00.000000000 +0200 +++ python-sievelib-1.1.1/debian/patches/0001-Put-the-list-of-requirements-in-setup.py.patch 2020-07-06 14:42:50.000000000 +0300 @@ -0,0 +1,63 @@ +From 91f40ec226ea288e98379da01672a46dabd89fc9 Mon Sep 17 00:00:00 2001 +From: Petr Viktorin <pvikt...@redhat.com> +Date: Fri, 12 Oct 2018 14:32:18 +0200 +Subject: Put the list of requirements in setup.py + +Pip's internal API is unstable and might actually change more often +than the list of requirements. + +Put the requirements in setup.py, and refer there from requirements.txt +--- + requirements.txt | 5 +++-- + setup.py | 19 +------------------ + 2 files changed, 4 insertions(+), 20 deletions(-) + +diff --git a/requirements.txt b/requirements.txt +index dd68eb2..a10e857 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -1,2 +1,3 @@ +-future +-six ++# Requirements are listed in setup.py. The dot on the next line refers to ++# the current directory, instructing installers to use this package's setup.py ++. +diff --git a/setup.py b/setup.py +index 784608d..e266fcb 100644 +--- a/setup.py ++++ b/setup.py +@@ -12,30 +12,13 @@ from __future__ import unicode_literals + + import io + from os import path +-try: # for pip >= 10 (From: https://stackoverflow.com/questions/25192794/no-module-named-pip-req) +- from pip._internal.req import parse_requirements +-except ImportError: # for pip <= 9.0.3 +- from pip.req import parse_requirements + from setuptools import setup, find_packages + + +-def get_requirements(requirements_file): +- """Use pip to parse requirements file.""" +- requirements = [] +- if path.isfile(requirements_file): +- for req in parse_requirements(requirements_file, session="hack"): +- # check markers, such as +- # +- # rope_py3k ; python_version >= '3.0' +- # +- if req.match_markers(): +- requirements.append(str(req.req)) +- return requirements +- ++INSTALL_REQUIRES = ['future', 'six'] + + if __name__ == "__main__": + HERE = path.abspath(path.dirname(__file__)) +- INSTALL_REQUIRES = get_requirements(path.join(HERE, "requirements.txt")) + with io.open(path.join(HERE, "README.rst"), encoding="utf-8") as readme: + LONG_DESCRIPTION = readme.read() + setup( +-- +2.20.1 + diff -Nru python-sievelib-1.1.1/debian/patches/series python-sievelib-1.1.1/debian/patches/series --- python-sievelib-1.1.1/debian/patches/series 2020-03-07 20:52:38.000000000 +0200 +++ python-sievelib-1.1.1/debian/patches/series 2020-07-06 14:44:57.000000000 +0300 @@ -1 +1,2 @@ 0001-Fix-import-of-req-module-from-pip-10.patch +0001-Put-the-list-of-requirements-in-setup.py.patch