diff options
| author | Tianling Shen <cnsztl@immortalwrt.org> | 2023-06-13 11:01:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-13 11:01:00 +0800 |
| commit | 6df6880800397ab3821572c6c5ad18e300374d9e (patch) | |
| tree | e2cd9cb3663a80a4de7e857c58977fd8a26e823c /lang/python/python3/patches-pip | |
| parent | 39ddffe42dad25e805884a29664ea4dfef90105b (diff) | |
| parent | f7a8607579f72f504dadc48379c2746210eea7c6 (diff) | |
Merge pull request #21348 from jefferyto/python-3.7.17-openwrt-19.07openwrt-19.07
[openwrt-19.07] python3: Update to 3.7.17
Diffstat (limited to 'lang/python/python3/patches-pip')
| -rw-r--r-- | lang/python/python3/patches-pip/001-pep517-pyc-fix.patch | 20 | ||||
| -rw-r--r-- | lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch | 20 |
2 files changed, 20 insertions, 20 deletions
diff --git a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch deleted file mode 100644 index e600b0a30..000000000 --- a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py -index c932313..a01143b 100644 ---- a/pip/_vendor/pep517/in_process/__init__.py -+++ b/pip/_vendor/pep517/in_process/__init__.py -@@ -10,8 +10,13 @@ try: - import importlib.resources as resources - - def _in_proc_script_path(): -- return resources.path(__package__, '_in_process.py') -+ if resources.is_resource(__package__, '_in_process.py'): -+ return resources.path(__package__, '_in_process.py') -+ return resources.path(__package__, '_in_process.pyc') - except ImportError: - @contextmanager - def _in_proc_script_path(): -- yield pjoin(dirname(abspath(__file__)), '_in_process.py') -+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py') -+ if not os.path.isfile(_in_proc_script): -+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc') -+ yield _in_proc_script diff --git a/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch b/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch new file mode 100644 index 000000000..72f6896f3 --- /dev/null +++ b/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch @@ -0,0 +1,20 @@ +diff --git a/pip/_vendor/pyproject_hooks/_in_process/__init__.py b/pip/_vendor/pyproject_hooks/_in_process/__init__.py +index 917fa065b3c7..c9ec8efd53b3 100644 +--- a/pip/_vendor/pyproject_hooks/_in_process/__init__.py ++++ b/pip/_vendor/pyproject_hooks/_in_process/__init__.py +@@ -11,8 +11,13 @@ try: + except AttributeError: + # Python 3.8 compatibility + def _in_proc_script_path(): +- return resources.path(__package__, '_in_process.py') ++ if resources.is_resource(__package__, '_in_process.py'): ++ return resources.path(__package__, '_in_process.py') ++ return resources.path(__package__, '_in_process.pyc') + else: + def _in_proc_script_path(): ++ if resources.files(__package__).joinpath('_in_process.py').is_file(): ++ return resources.as_file( ++ resources.files(__package__).joinpath('_in_process.py')) + return resources.as_file( +- resources.files(__package__).joinpath('_in_process.py')) ++ resources.files(__package__).joinpath('_in_process.pyc')) |
