重新打包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)

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

兹免费准许任何人取得副本 本软件和相关文档文件(“软件”)的 在软件中不受限制,包括但不限于 使用、复制、修改、合并、发布、分发、再授权和/或出售 软件的副本,并允许软件的用户 在满足以下条件的情况下,可以这样做:

上述版权公告及本许可公告须包括在 软件的拷贝或大部分。

本软件按“原样”提供,无任何形式的保证,明示或 默示的,包括但不限于适销性保证, 适合特定目的和不侵权。在任何情况下 作者或版权所有者应对任何索赔、损害或其他 责任,无论是在合同诉讼、侵权诉讼或其他诉讼中, 不属于或与本软件有关,或使用或与本软件的其他交易有关。 软件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java:字符串。RTL设备语言用标志“+”格式化,数字后加符号   java GAE作为桌面应用程序(Swing)的服务提供商   java将InputStream转换为FileInputStream不适用于Apache POI   java外部Voronoi库“网格”:什么是草图和处理?   重载重写的泛型方法java   java显示组织上设置的错误。springframework。验证。jsp中的错误对象   java一些Spring模型属性没有显示在我的JSP中   java无法编译Guava 23的SimpleTimeLimiter示例   java如何更改JTree中的“根”目录名?   java如何在安卓中对相对布局产生连锁反应?   java错误:org。冬眠例外SQLGrammarException:无法提取结果集,dateAccessed是未知列   如何使用java监听JSON文件更新   由抽象封闭类创建的匿名内部类能否通过反射确定实现类?