v0.0.8
0.0.8 - 2021-08-03
Changed
-
Since
WheelFile
write methods now haveskipdir=True
default (see below),
writing recursively from a directory will no longer produce entries for
directories. This also means, that attempting to write an empty directory (or
any directory, even withrecursive=False
) is no longer possible, unless
skipdir=False
is specified.This does not apply to
writestr_*
methods - attempting to write to an
arcname
ending in/
will produce an entry that is visible as a
directory. -
WheelFile.validate
will now fail and raiseValueError
ifWHEEL
build
tag field (.wheeldata.build
) contains a value that is different from the
wheel name (.build_tag
).
Added
WheelFile.from_wheelfile
- a constructor class-method that makes it
possible to recreate a wheel and: rename it (change distname, version,
buildnumber and/or tags), append files to it, change its metadata, etc.WheelFile.METADATA_FILENAMES
- a static field with a set of names of
metadata files managed by this class.WheelFile.writestr_distinfo
- similar towrite_distinfo
, this is a safe
shortcut for writing into.dist-info
directory.WheelFile.__init__
now takes configuration arguments known fromZipFile
:
compression
,compression
,allowZip64
, andstrict_timestamps
. They
work the same way, except that they are keyword only inWheelFile
, and the
default value forcompression
iszipfile.ZIP_DEFLATED
.WheelFile
write methods now take optionalcompress_type
and
compresslevel
arguments known fromZipFile
.- New
skipdir
argument inWheelFile
write methods:write
,write_data
,
andwrite_distinfo
. WhenTrue
(which is the default), these methods will
not write ZIP entries for directories into the archive.
Fixed
- Docstring of the
WheelFile.filename
property, which was innacurate. MetaData.from_str
will now correctly unpackKeywords
field into a list of
strings, instead of a one-element list with a string containing
comma-separated tags.