diff options
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/avoid-deprecated-platform-dist.patch | 43 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | setup.py | 9 |
4 files changed, 54 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index 10d6d03..8e5b09f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +py-macaroon-bakery (1.2.3-3) unstable; urgency=medium + + * Cherry-pick from upstream: + - Avoid using deprecated platform.dist() in setup.py. + + -- Colin Watson <cjwatson@debian.org> Thu, 26 Dec 2019 22:46:22 +0000 + py-macaroon-bakery (1.2.3-2) unstable; urgency=medium [ Ondřej Nový ] diff --git a/debian/patches/avoid-deprecated-platform-dist.patch b/debian/patches/avoid-deprecated-platform-dist.patch new file mode 100644 index 0000000..0bb3bd2 --- /dev/null +++ b/debian/patches/avoid-deprecated-platform-dist.patch @@ -0,0 +1,43 @@ +From: Francesco Banconi <francesco.banconi@canonical.com> +Date: Mon, 13 May 2019 11:27:48 +0200 +Subject: Avoid using deprecated platform.dist() in setup.py + +Bug: https://github.com/go-macaroon-bakery/py-macaroon-bakery/issues/74 +Origin: upstream, https://github.com/go-macaroon-bakery/py-macaroon-bakery/commit/3721180c4a3765e8807392fca2b7e7c2d7ffae45 +Last-Update: 2019-12-26 +--- + setup.py | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/setup.py b/setup.py +index f098e76..83aec8c 100755 +--- a/setup.py ++++ b/setup.py +@@ -3,7 +3,6 @@ + # Copyright 2017 Canonical Ltd. + # Licensed under the LGPLv3, see LICENCE file for details. + import sys +-import platform + + from setuptools import ( + find_packages, +@@ -39,16 +38,14 @@ test_requirements = [ + 'httmock==1.2.5', + ] + +-distribution = platform.dist() +-if len(distribution) == 3 and distribution[2] == 'trusty': ++if sys.version_info < (2, 7, 9): + # Injected into urllib3 to fix insecure Python 2. + requirements.extend([ + 'cryptography==1.3.2', +- 'pyOpenSSL==16.0.0', +- 'pyasn1==0.1.9', + 'ndg_httpsclient==0.3.3', ++ 'pyasn1==0.1.9', ++ 'pyOpenSSL==16.0.0', + ]) +- + if sys.version_info.major == 2: + requirements.append('ipaddress') + diff --git a/debian/patches/series b/debian/patches/series index f8e7d6e..fc4bd34 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ isolate-from-proxy.patch improve-unknown-interaction-mock.patch +avoid-deprecated-platform-dist.patch @@ -3,7 +3,6 @@ # Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details. import sys -import platform from setuptools import ( find_packages, @@ -39,16 +38,14 @@ test_requirements = [ 'httmock==1.2.5', ] -distribution = platform.dist() -if len(distribution) == 3 and distribution[2] == 'trusty': +if sys.version_info < (2, 7, 9): # Injected into urllib3 to fix insecure Python 2. requirements.extend([ 'cryptography==1.3.2', - 'pyOpenSSL==16.0.0', - 'pyasn1==0.1.9', 'ndg_httpsclient==0.3.3', + 'pyasn1==0.1.9', + 'pyOpenSSL==16.0.0', ]) - if sys.version_info.major == 2: requirements.append('ipaddress') |