python-2.4-020-gentoo_py_dontcompile.patch 588 B

123456789101112131415161718
  1. diff -rduNp Python-2.4.2-010/Python/import.c Python-2.4.2/Python/import.c
  2. --- Python-2.4.2-010/Python/import.c 2005-09-14 20:15:03.000000000 +0200
  3. +++ Python-2.4.2/Python/import.c 2007-01-22 19:49:18.000000000 +0100
  4. @@ -822,8 +822,12 @@ static void
  5. write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
  6. {
  7. FILE *fp;
  8. -
  9. - fp = open_exclusive(cpathname);
  10. + char *py_dontcompile = getenv("PYTHON_DONTCOMPILE");
  11. +
  12. + if (!py_dontcompile)
  13. + fp = open_exclusive(cpathname);
  14. + else
  15. + fp = NULL;
  16. if (fp == NULL) {
  17. if (Py_VerboseFlag)
  18. PySys_WriteStderr(