Files
Arch-R/packages/lang/Python3/patches/Python3-0000-default-is-optimized.patch
MilhouseVH 214829e511 Python3: update to Python3-3.7.5; install target
Remove bogus post_unpack() step as it no longer has any effect with
repsect to pgen (or pgen2).
2019-10-29 12:19:07 +00:00

30 lines
1.1 KiB
Diff

From 34116c8ab386aa1fb29f1819ee44b4e89260a1f1 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Thu, 17 Oct 2019 00:18:30 +0100
Subject: [PATCH] Enable optimization by default
Do *not* enable Py_OptimizeFlag=2 (or higher) as this will stop
__doc__ output from being generated which will prevent the qemu
package for Generic from building.
---
Python/pylifecycle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 55d1ba5..fe6e082 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -115,7 +115,7 @@ int Py_VerboseFlag = 0; /* Needed by import.c */
int Py_QuietFlag = 0; /* Needed by sysmodule.c */
int Py_InteractiveFlag = 0; /* Needed by Py_FdIsInteractive() below */
int Py_InspectFlag = 0; /* Needed to determine whether to exit at SystemExit */
-int Py_OptimizeFlag = 0; /* Needed by compile.c */
+int Py_OptimizeFlag = 1; /* Needed by compile.c */
int Py_NoSiteFlag = 0; /* Suppress 'import site' */
int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */
int Py_FrozenFlag = 0; /* Needed by getpath.c */
--
2.7.4