Merge branch 'bc/git-p4-for-python-2.4'

With small updates to remove dependency on newer features of
Python, keep git-p4 usable with older Python.

* bc/git-p4-for-python-2.4:
  INSTALL: git-p4 does not support Python 3
  git-p4.py: support Python 2.4
  git-p4.py: support Python 2.5
This commit is contained in:
Junio C Hamano
2013-02-01 12:40:10 -08:00
3 changed files with 35 additions and 11 deletions

View File

@@ -105,12 +105,13 @@ build_gendouble() {
cat >gendouble.py <<-\EOF
import sys
import struct
import array
s = array.array("c", '\0' * 26)
struct.pack_into(">L", s, 0, 0x00051607) # AppleDouble
struct.pack_into(">L", s, 4, 0x00020000) # version 2
s.tofile(sys.stdout)
s = struct.pack(">LL18s",
0x00051607, # AppleDouble
0x00020000, # version 2
"" # pad to 26 bytes
)
sys.stdout.write(s)
EOF
}