From f20c9dc688948db2b4dfd0a6a68398c4bf0c6254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20B=C5=82a=C5=BCejewicz?= Date: Sun, 26 Apr 2020 15:44:45 +0200 Subject: [PATCH 1/2] fix(pep425tags): missing package import added This fixes errors at runtime on Linux ARM: ```py if platform == "linux_armv7l" and not is_linux_armhf() ``` this triggers a check using `os`, which was not imported, resulting in runtime error. Thanks! --- pipenv/patched/notpip/_internal/pep425tags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pipenv/patched/notpip/_internal/pep425tags.py b/pipenv/patched/notpip/_internal/pep425tags.py index c2a1e346..16d041d9 100644 --- a/pipenv/patched/notpip/_internal/pep425tags.py +++ b/pipenv/patched/notpip/_internal/pep425tags.py @@ -3,6 +3,7 @@ from __future__ import absolute_import import distutils.util import logging +import os import platform import re import sys From d8be5350060f5d44d50266855a7071d77e33678f Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sun, 26 Apr 2020 15:55:20 -0400 Subject: [PATCH 2/2] Update patch for pep425tags to include os import Signed-off-by: Dan Ryan --- .../patched/_post-pip-update-pep425tags.patch | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tasks/vendoring/patches/patched/_post-pip-update-pep425tags.patch b/tasks/vendoring/patches/patched/_post-pip-update-pep425tags.patch index 792a94fa..b552a7b0 100644 --- a/tasks/vendoring/patches/patched/_post-pip-update-pep425tags.patch +++ b/tasks/vendoring/patches/patched/_post-pip-update-pep425tags.patch @@ -1,8 +1,16 @@ diff --git a/pipenv/patched/notpip/_internal/pep425tags.py b/pipenv/patched/notpip/_internal/pep425tags.py -index 042ba34b..58decc23 100644 +index 369275a8..16d041d9 100644 --- a/pipenv/patched/notpip/_internal/pep425tags.py +++ b/pipenv/patched/notpip/_internal/pep425tags.py -@@ -170,8 +170,9 @@ def is_linux_armhf(): +@@ -3,6 +3,7 @@ from __future__ import absolute_import + + import distutils.util + import logging ++import os + import platform + import re + import sys +@@ -170,8 +171,9 @@ def is_linux_armhf(): return False # hard-float ABI can be detected from the ELF header of the running # process @@ -13,7 +21,7 @@ index 042ba34b..58decc23 100644 elf_header_raw = f.read(40) # read 40 first bytes of ELF header except (IOError, OSError, TypeError): return False -@@ -205,7 +206,7 @@ def is_manylinux1_compatible(): +@@ -205,7 +207,7 @@ def is_manylinux1_compatible(): pass # Check glibc version. CentOS 5 uses glibc 2.5. @@ -22,7 +30,7 @@ index 042ba34b..58decc23 100644 def is_manylinux2010_compatible(): -@@ -223,7 +224,7 @@ def is_manylinux2010_compatible(): +@@ -223,7 +225,7 @@ def is_manylinux2010_compatible(): pass # Check glibc version. CentOS 6 uses glibc 2.12. @@ -31,7 +39,7 @@ index 042ba34b..58decc23 100644 def is_manylinux2014_compatible(): -@@ -249,7 +250,7 @@ def is_manylinux2014_compatible(): +@@ -249,7 +251,7 @@ def is_manylinux2014_compatible(): pass # Check glibc version. CentOS 7 uses glibc 2.17.