the gzip FNAME header as required by RFC 1952.
# based on Andrew Kuchling's minigzip.py distributed with the zlib module
-import struct, sys, time
+import struct, sys, time, os
import zlib
import __builtin__
def _write_gzip_header(self):
self.fileobj.write('\037\213') # magic header
self.fileobj.write('\010') # compression method
- fname = self.name
+ fname = os.path.basename(self.name)
if fname.endswith(".gz"):
fname = fname[:-3]
flags = 0
Library
-------
+- Issue #4750: Store the basename of the original filename in the gzip FNAME
+ header as required by RFC 1952.
+
- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in
Distutils.