about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch b/pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch
new file mode 100644
index 000000000000..83f3fea1931b
--- /dev/null
+++ b/pkgs/development/interpreters/python/cpython/2.6/nix-store-mtime.patch
@@ -0,0 +1,12 @@
+diff -ru -x '*~' Python-2.7.1-orig/Python/import.c Python-2.7.1/Python/import.c
+--- Python-2.7.1-orig/Python/import.c	2010-05-20 20:37:55.000000000 +0200
++++ Python-2.7.1/Python/import.c	2011-01-04 15:55:11.000000000 +0100
+@@ -751,7 +751,7 @@
+         return NULL;
+     }
+     pyc_mtime = PyMarshal_ReadLongFromFile(fp);
+-    if (pyc_mtime != mtime) {
++    if (pyc_mtime != mtime && mtime != 1) {
+         if (Py_VerboseFlag)
+             PySys_WriteStderr("# %s has bad mtime\n", cpathname);
+         fclose(fp);