python-gentoo_py_dontcompile.patch 478 B

1234567891011121314151617
  1. --- Python-2.3.2/Python/import.c 2003-10-08 12:29:03.166032656 +0100
  2. +++ import.c 2003-10-08 12:32:57.423420120 +0100
  3. @@ -808,8 +808,12 @@
  4. write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
  5. {
  6. FILE *fp;
  7. -
  8. - fp = open_exclusive(cpathname);
  9. + char *py_dontcompile = getenv("PYTHON_DONTCOMPILE");
  10. +
  11. + if (!py_dontcompile)
  12. + fp = open_exclusive(cpathname);
  13. + else
  14. + fp = NULL;
  15. if (fp == NULL) {
  16. if (Py_VerboseFlag)
  17. PySys_WriteStderr(