]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-96954: Fix `make regen-unicodedata` in out-of-tree builds (#112118)
authorMiro Hrončok <miro@hroncok.cz>
Wed, 15 Nov 2023 16:42:17 +0000 (17:42 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2023 16:42:17 +0000 (16:42 +0000)
This avoids:

    python3.13 Tools/unicode/makeunicodedata.py
    python3.13: can't open file '.../build/debug/Tools/unicode/makeunicodedata.py': [Errno 2] No such file or directory
    make: *** [Makefile:1498: regen-unicodedata] Error 2

Re-run `make regen-unicodedata` to update the script path in generated files.

Makefile.pre.in
Misc/NEWS.d/next/Build/2023-11-15-16-56-20.gh-issue-96954.6FYvKn.rst [new file with mode: 0644]
Modules/unicodedata_db.h
Modules/unicodename_db.h
Objects/unicodetype_db.h

index 4fa0337fcc7777a2dadd4ad0af6f9aa9799f74cc..3405975e89040af8ab060fb6e30c2737bfca2aed 100644 (file)
@@ -1348,7 +1348,7 @@ regen-limited-abi: all
 
 .PHONY: regen-unicodedata
 regen-unicodedata:
-       $(PYTHON_FOR_REGEN) Tools/unicode/makeunicodedata.py
+       $(PYTHON_FOR_REGEN) $(srcdir)/Tools/unicode/makeunicodedata.py
 
 
 ############################################################################
diff --git a/Misc/NEWS.d/next/Build/2023-11-15-16-56-20.gh-issue-96954.6FYvKn.rst b/Misc/NEWS.d/next/Build/2023-11-15-16-56-20.gh-issue-96954.6FYvKn.rst
new file mode 100644 (file)
index 0000000..e9a30e5
--- /dev/null
@@ -0,0 +1 @@
+Make ``make regen-unicodedata`` work for out-of-tree builds of CPython.
index ed4b0eea9a6c5909decda935b49dd108d016fe2f..3e210863448b7882149039290789e82a480de281 100644 (file)
@@ -1,4 +1,4 @@
-/* this file was generated by Tools/unicode/makeunicodedata.py 3.3 */
+/* this file was generated by ./Tools/unicode/makeunicodedata.py 3.3 */
 
 #define UNIDATA_VERSION "15.1.0"
 /* a list of unique database records */
index a39dcccd4085117c0342de2f143f5fd15824d880..4fe60ad5ed4452c0f9c89e9374616dfac8cdd95a 100644 (file)
@@ -1,4 +1,4 @@
-/* this file was generated by Tools/unicode/makeunicodedata.py 3.3 */
+/* this file was generated by ./Tools/unicode/makeunicodedata.py 3.3 */
 
 #define NAME_MAXLEN 256
 
index 39a567dc46e89a88fbe7c4bd82bb2e7fce0b418a..e6dbeffbe2aa3ec681e0d5035b0e6cd96b4cc3f1 100644 (file)
@@ -1,4 +1,4 @@
-/* this file was generated by Tools/unicode/makeunicodedata.py 3.3 */
+/* this file was generated by ./Tools/unicode/makeunicodedata.py 3.3 */
 
 /* a list of unique character type descriptors */
 const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {