Fix incomplete patch for pep3147 tweak
This commit is contained in:
parent
7c7048ab2f
commit
64436de23b
|
@ -1,20 +1,5 @@
|
||||||
From a348d830659fffd2cfc42994524783b07e69b4b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mathieu Lirzin <mthl@gnu.org>
|
|
||||||
Date: Sun, 8 Jul 2018 23:41:42 +0200
|
|
||||||
Subject: python: Don't use '\n' in sed substitution
|
|
||||||
|
|
||||||
This change fixes automake bug#31222.
|
|
||||||
|
|
||||||
On macOS, 'sed' interprets '\n' in the substitution text as the letter 'n'
|
|
||||||
instead of as a newline.
|
|
||||||
|
|
||||||
* lib/am/python.am [?FIRST?] (am__pep3147_tweak): Use a space instead of '\n'.
|
|
||||||
---
|
|
||||||
lib/am/python.am | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lib/am/python.am b/lib/am/python.am
|
diff --git a/lib/am/python.am b/lib/am/python.am
|
||||||
index 21e6f84..c855cdd 100644
|
index 21e6f842c..e29ecfcd0 100644
|
||||||
--- a/lib/am/python.am
|
--- a/lib/am/python.am
|
||||||
+++ b/lib/am/python.am
|
+++ b/lib/am/python.am
|
||||||
@@ -97,7 +97,7 @@ endif %?INSTALL%
|
@@ -97,7 +97,7 @@ endif %?INSTALL%
|
||||||
|
@ -22,10 +7,42 @@ index 21e6f84..c855cdd 100644
|
||||||
|
|
||||||
?FIRST?am__pep3147_tweak = \
|
?FIRST?am__pep3147_tweak = \
|
||||||
-?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
|
-?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
|
||||||
+?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc &.*.pyo|'
|
+?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
|
||||||
|
|
||||||
.PHONY uninstall-am: uninstall-%DIR%PYTHON
|
.PHONY uninstall-am: uninstall-%DIR%PYTHON
|
||||||
uninstall-%DIR%PYTHON:
|
uninstall-%DIR%PYTHON:
|
||||||
--
|
@@ -108,19 +108,26 @@ uninstall-%DIR%PYTHON:
|
||||||
cgit v1.0-41-gc330
|
test -n "$$py_files" || exit 0; \
|
||||||
|
dir='$(DESTDIR)$(%NDIR%dir)'; \
|
||||||
|
## Also remove the .pyc and .pyo byte compiled versions.
|
||||||
|
+## This is somewhat tricky, because for newer pythons we have to take
|
||||||
|
+## PEP-3147 into account.
|
||||||
|
pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
|
||||||
|
pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
|
||||||
|
+ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
|
||||||
|
+ echo "$$py_files_pep3147";\
|
||||||
|
+ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
|
||||||
|
+ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
|
||||||
|
st=0; \
|
||||||
|
- for files in "$$py_files" "$$pyc_files" "$$pyo_files"; do \
|
||||||
|
+ for files in \
|
||||||
|
+ "$$py_files" \
|
||||||
|
+ "$$pyc_files" \
|
||||||
|
+ "$$pyo_files" \
|
||||||
|
+## Installation of '.py' files is not influenced by PEP-3147, so it
|
||||||
|
+## is correct *not* to have $pyfiles_pep3147 here.
|
||||||
|
+ "$$pyc_files_pep3147" \
|
||||||
|
+ "$$pyo_files_pep3147" \
|
||||||
|
+ ; do \
|
||||||
|
$(am__uninstall_files_from_dir) || st=$$?; \
|
||||||
|
done; \
|
||||||
|
-## This is somewhat tricky, because for newer pythons we have to take PEP-3147
|
||||||
|
-## into account. Avoid exceeding the command-line length limit.
|
||||||
|
- dir='$(DESTDIR)$(%NDIR%dir)/__pycache__'; \
|
||||||
|
- echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
|
||||||
|
- while read files; do \
|
||||||
|
- $(am__uninstall_files_from_dir) || st=$$?; \
|
||||||
|
- done || exit $$?; \
|
||||||
|
exit $$st
|
||||||
|
endif %?INSTALL%
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue