From cafe16fde99ea057106c3a365dca832add127f4b Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sun, 17 Nov 2019 23:36:30 +0200 Subject: [PATCH] python: fix os.link error in pathlib.py See issue https://github.com/termux/termux-packages/issues/4557. --- packages/python/Lib-pathlib.py.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/python/Lib-pathlib.py.patch diff --git a/packages/python/Lib-pathlib.py.patch b/packages/python/Lib-pathlib.py.patch new file mode 100644 index 000000000..10d818651 --- /dev/null +++ b/packages/python/Lib-pathlib.py.patch @@ -0,0 +1,16 @@ +diff -uNr Python-3.8.0/Lib/pathlib.py Python-3.8.0.mod/Lib/pathlib.py +--- Python-3.8.0/Lib/pathlib.py 2019-10-14 16:34:47.000000000 +0300 ++++ Python-3.8.0.mod/Lib/pathlib.py 2019-11-17 23:35:51.224429521 +0200 +@@ -412,7 +412,11 @@ + + unlink = os.unlink + +- link_to = os.link ++ if hasattr(os, "link"): ++ link_to = os.link ++ else: ++ def link_to(self, src, dst): ++ NotImplementedError("link() not available on this system") + + rmdir = os.rmdir +