lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

004-do-not-write-bytes-codes.patch (1334B)


      1 diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
      2 index a17adf7..415b3f6 100644
      3 --- a/Python/pylifecycle.c
      4 +++ b/Python/pylifecycle.c
      5 @@ -86,7 +86,7 @@ int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
      6  int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
      7  int Py_FrozenFlag; /* Needed by getpath.c */
      8  int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
      9 -int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
     10 +int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */
     11  int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
     12  int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
     13  int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
     14 @@ -309,7 +309,7 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
     15      if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
     16          Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
     17      if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
     18 -        Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
     19 +        Py_DontWriteBytecodeFlag = atoi(p);
     20      /* The variable is only tested for existence here; _PyRandom_Init will
     21         check its value further. */
     22      if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')