重新打包zip档案
rezip的Python项目详细描述
重新压缩-重新打包压缩文件
重新打包zip归档文件,以便更新元数据,例如, Unix访问权限位。rezip可用于修复windows生成的zip 存档(例如python wheel包),以便存档成员 具有在Linux上使用的适当访问权限。
gitlab页面:https://gitlab.com/dfritzsche/python-rezip
使用rezip
用法:
rezip [--inplace] [--glob|-g] [--normalize-access-rights] [--date-time DATETIME] [--output|-o OUTPUT] INPUT [INPUT]...
--inplace
Repack in place. This is done by writing to a temporary file and then replace the original input file with the temporary output file. On Posix systems an atomic move is used for the replacement of the original input file by the temporary output file.
More than one ^{tt2}$ file can be specified if ^{tt1}$ is used.
Note: The ^{tt1}$ option is mutual exclusive with the ^{tt5}$ option.
--glob | -g
Treat the input file names as shell glob patterns.
--normalize-access-rights
Normalize the Unix access right bits. Access rights of regular non-executable files are modified to ^{tt8}$. Access rights of executable files are modified to be ^{tt9}$. Rezip considers files that already have any executable bit set and files that are identified as ELF programs or ELF dynamic libraries as executable.
Identification as an ELF file is done by looking if the file starts with the ELF magic bytes ^{tt10}$ and then reading the e_type field of the ELF header. As this is in the end only a heuristic, wrong executable-identifcations may happen.
--date-time DATETIME
Set the date time of all files in the ZIP archive to ^{tt12}$. The date time ^{tt12}$ must be a Unix timestamp or a date time in ISO format that is understood by fromisoformat().
INPUT
The ZIP archive to read
More than one ^{tt2}$ file can be specified if ^{tt1}$ is used. Otherwise, only one ^{tt2}$ file is allowed.
--output | -o
The ZIP archive to create and write to.
Note: The ^{tt5}$ option is mutual exclusive with the ^{tt1}$ option.
更改日志历史记录
V0.5.1(2019-06-21)
- 使用sphinx-rst-builder创建 readme.rst和changelog.rst。这样,完整的sphinx标记就可以 在创建rst文件时在docs/下的源文件中使用 可以通过gitlab、github和 皮皮。
V0.5.0(2019-05-26)
- 设置create_system(pkzip 4.4.2版本 修改时由)生成到3(unix) external_attr设置unix权限。 存储在external_attr中的Unix权限 无法通过zipfile或info zip正确还原,如果 create_system是0(脂肪)。
V0.4.1(2019-05-21)
- 更新了自述文件。
V0.4.0(2019-05-21)
- 新的--glob(或-g)选项将输入文件名视为shell 球状图案。
- 使用--inplace时允许多个输入文件。
- 新的--output(或-o)选项指定输出文件。
V0.3.2(2019-05-19)
- 文档改进
V0.3.0(2019-05-19)
- 新的--date-time选项设置zip文件中的文件日期时间
V0.2.2(2019-05-14)
- 在sdist中包含许可文件
V0.2.1(2019-05-13)
- 包装改进
V0.2.0(2019-05-13)
- 更新的文档
V0.1.0(2019-05-13)
- 首次公开发行
许可证
麻省理工学院许可证
版权所有(c)2019 David Fritzsche
兹免费准许任何人取得副本 本软件和相关文档文件(“软件”)的 在软件中不受限制,包括但不限于 使用、复制、修改、合并、发布、分发、再授权和/或出售 软件的副本,并允许软件的用户 在满足以下条件的情况下,可以这样做:
上述版权公告及本许可公告须包括在 软件的拷贝或大部分。
本软件按“原样”提供,无任何形式的保证,明示或 默示的,包括但不限于适销性保证, 适合特定目的和不侵权。在任何情况下 作者或版权所有者应对任何索赔、损害或其他 责任,无论是在合同诉讼、侵权诉讼或其他诉讼中, 不属于或与本软件有关,或使用或与本软件的其他交易有关。 软件。