python包deb-pkg-tools是要构建和

检查Debian binary packages和二进制包的存储库。它的

主要用例是自动化构建。

一些功能在命令行界面中公开(如下所述)

因为在shell脚本中使用非常方便,而其他功能

将用作python api。包当前在cpython上测试

2.6、2.7、3.4、3.5、3.6、3.7和Pypy(2.7)。

请注意,deb-pkg-tools对于debian二进制文件的

应该构建包,并将其中的一些观点强加于用户。

使用可选的函数参数和/或环境可以避免大多数情况

变量。如果你发现了一些不符合你喜欢的东西而你不能

解决这个问题,可以随意要求额外的配置选项;我尝试

对我的项目的可能用例保持开放的心态。

一方面,deb-pkg-tools包是基于我在

Debian包和存储库在过去几年中

handdeb-pkg-tools本身还很年轻。同样,大多数功能是

由自动化测试覆盖;编写时覆盖率约为90%(有些

如果我们还想测试

非错误情况,这当然是主要焦点:—)

deb-pkg-tools包在PyPI上可用,这意味着安装

应该简单到:$ pip install deb-pkg-tools

实际上,安装python包的方法有很多(例如,per

user site-packages directory,virtual environments),或者只是安装

我不打算在这里讨论,所以

如果这让你感到害怕,那么在回到这些之前,先阅读一下你的选项

说明;-)。

在hood下deb-pkg-tools使用Debian提供的几个程序

有关详细信息,请参见dependencies部分。要安装这些程序:$ sudo apt-get install dpkg-dev fakeroot lintian

有两种方法可以使用deb-pkg-tools包:作为命令行

程序和作为python api。有关python api的详细信息,请参阅

在Read the Docs上提供的api文档。命令行界面

如下所述。

用法:deb-pkg-tools [OPTIONS] ...

deb pkg tools python项目的包装器,该项目实现了

检查、构建和操作Debian二进制包档案和相关的

像普通存储库这样的实体。

支持的选项:OptionDescription^{tt9}$, ^{tt10}$Inspect the metadata in the Debian binary package archive given by ^{tt11}$

(similar to “dpkg ^{tt12}$”).

^{tt13}$, ^{tt14}$Copy the package archive(s) given as positional arguments (and all package

archives required by the given package archives) into the directory given

by ^{tt15}$.

^{tt16}$, ^{tt17}$Perform static analysis on a package archive and its dependencies in order

to recognize common errors as soon as possible.

^{tt18}$, ^{tt19}$Patch fields into the existing control file given by ^{tt11}$. To be used

together with the ^{tt21}$, ^{tt22}$ option.

^{tt21}$, ^{tt24}$A line to patch into the control file (syntax: “Name: Value”). To be used

together with the ^{tt18}$, ^{tt26}$ option.

^{tt27}$, ^{tt28}$Build a Debian binary package with “dpkg-deb ^{tt29}$” (and lots of

intermediate Python magic, refer to the API documentation of the project

for full details) based on the binary package template in the directory

given by ^{tt15}$. The resulting archive is located in the system wide

temporary directory (usually /tmp).

^{tt31}$, ^{tt32}$Create or update the trivial Debian binary package repository in the

directory given by ^{tt15}$.

^{tt34}$, ^{tt35}$Enable “apt-get” to install packages from the trivial repository (requires

root/sudo privilege) in the directory given by ^{tt15}$. Alternatively you can

use the ^{tt37}$, ^{tt38}$ option.

^{tt39}$, ^{tt40}$Cleans up after ^{tt41}$ (requires root/sudo privilege).

Alternatively you can use the ^{tt37}$, ^{tt38}$ option.

^{tt37}$, ^{tt45}$Create or update a trivial package repository, activate the repository, run

the positional arguments as an external command (usually “apt-get install”)

and finally deactivate the repository.

^{tt46}$, ^{tt47}$Force removal of stale entries from the persistent (on disk) package

metadata cache. Garbage collection is performed automatically by the

deb-pkg-tools command line interface when the last garbage collection

cycle was more than 24 hours ago, so you only need to do it manually

when you want to control when it happens (for example by a daily

cron job scheduled during idle hours :-).

^{tt48}$, ^{tt49}$Assume the answer to interactive questions is yes.

^{tt50}$, ^{tt51}$Make more noise! (useful during debugging)

^{tt52}$, ^{tt53}$Show this message and exit.

需要注意的一点是deb-pkg-tools--update-repocan的操作

受配置文件的影响。有关详细信息,请参阅

关于deb_pkg_tools.repo.select_gpg_key()的文档。

deb-pkg-tools需要以下外部程序(取决于

您当然要使用哪些功能:ProgramPackage^{tt56}$^{tt57}$

^{tt58}$^{tt59}$

^{tt60}$^{tt61}$

^{tt62}$^{tt63}$

^{tt64}$^{tt65}$

^{tt66}$^{tt61}$

^{tt68}$^{tt68}$

^{tt70}$^{tt71}$

^{tt72}$^{tt72}$

^{tt74}$^{tt74}$

这些程序/包中的大多数已经安装在

基于Debian的系统,因此您只需要以下内容即可开始:$ sudo apt-get install dpkg-dev fakeroot lintian

如果环境变量不起作用,可以通过它们来调整一些东西

你的系统或平台。例如,在mac os x上,cp命令没有

有一个^ {tt77 } $参数,^ {tt78} $用户和组可能不存在,但

尽管如此,在mac os上测试包构建仍然是有用的。

x.以下环境变量可用于调整这些因素:VariableDefaultDescription^{tt79}$^{tt80}$Normalize ownership of files

during packaging.

^{tt81}$^{tt78}$During package builds the

ownership of all directories and

files is reset to this user.

^{tt83}$^{tt78}$During package builds the

ownership of all directories and

files is reset to this group.

^{tt85}$^{tt80}$Reset sticky bit on directories

inside package templates before

building.

^{tt87}$^{tt80}$Run commands using either

fakeroot or sudo (depending on

which is available).

^{tt89}$^{tt80}$Enable the usage of ^{tt91}$

during operations that normally

require elevated privileges.

^{tt92}$^{tt80}$Allow the usage of hard links to

speed up file copies between

directories on the same file

system.

^{tt94}$^{tt95}$Force the system to generate

entropy based on disk I/O.

^{tt96}$^{tt97}$Shell to use for the

^{tt98}$

command.

布尔选项的环境变量支持字符串yes,

true、1、no、false和0(忽略大小写)。

要禁用sudo的任何使用,可以使用以下命令:exportDPT_ALLOW_FAKEROOT_OR_SUDO=falseexportDPT_CHOWN_FILES=falseexportDPT_RESET_SETGID=falseexportDPT_SUDO=false

最新版本的deb-pkg-tools可在PyPI和GitHub上获得。这个

文档托管在Read the Docs。对于错误报告,请创建

关于GitHub的问题。如果你有问题、建议等,请随时寄给我

位于peter@peterodding.com的电子邮件。

版权所有©2018彼得·奥丁。

欢迎加入QQ群-->: 979659372

推荐PyPI第三方库

python使用pkg包_Python deb-pkg-tools包_程序模块 - PyPI - Python中文网相关推荐

  1. python app开发模块_Python pytkapp包_程序模块 - PyPI - Python中文网

    用于开发应用程序的python包 多文档/单文档界面 利用tkinter库和附加tkinter集 小部件. 查看可用演示: pytkapp/demo/run_ptapoptionsdemo.py-为选 ...

  2. python rest api client_Python py-jama-rest-client包_程序模块 - PyPI - Python中文网

    JAMA软件 JAMA软件是产品开发的最终记录和行动系统.公司的现代要求 测试管理解决方案有助于企业加快开发时间.降低风险.降低复杂性和验证. 法规遵从性.600多个以产品为中心的组织,包括nasa. ...

  3. python orange3_Python Orange3包_程序模块 - PyPI - Python中文网

    [橙色]是一个基于组件的数据挖掘软件.它包括一系列数据 可视化.探索.预处理和建模技术.可能是 通过漂亮直观的用户界面使用,或者对于更高级的用户, 作为python编程语言的模块. 这是最新版本的or ...

  4. python queue模块安装_Python queue包_程序模块 - PyPI - Python中文网

    沃特?另一个消息队列? 考虑到消息队列的激增,人们可能倾向于相信 发明更多不是答案.使用现有的解决方案是 多次尝试与大多数现有的消息队列产品. 其他的失败(对于我们的用例). queuey是用来处理大 ...

  5. python ssh登陆模块_Python sshh包_程序模块 - PyPI - Python中文网

    sshh是一个ssh帮助工具,用于在ssh代理中批量注册ssh私钥. sshh的主要目的是避免在 在ssh代理中注册的密钥数超过一定数量.当 当服务器设置私钥上限时,超过了密钥尝试的上限 严格的尝试. ...

  6. python cv模块_Python cv包_程序模块 - PyPI - Python中文网

    Cv 检查python模块的版本. 查询pypi并在所有可用版本中查找.__version__. 如果版本已经存在,则会引发错误. 在ci中很有用,可以记住更改库版本. 有关python模块版本控制的 ...

  7. python repusts模块_Python tslearn包_程序模块 - PyPI - Python中文网

    tslearn是一个python包,它为分析时间序列提供机器学习工具. 这个包基于scikit-learn.numpy和scipy库. 依赖关系Cython numpy numba scipy sci ...

  8. python3跑通smpl模型_Python smpl-pytorch包_程序模块 - PyPI - Python中文网

    Pythorch的SMPL层 SMPL人体[1]层为PyTorch(用v0.4和v1.x测试) 是一个可微的pytorch层,它确定地从姿势和形状参数映射到人体关节和顶点. 它可以作为可微层集成到任何 ...

  9. python cmd下载模块_Python cmd包_程序模块 - PyPI - Python中文网

    CMDY 从python运行命令的一个方便的包 安装# latest version pip install git+https://github.com/pwwang/cmdy # released ...

最新文章

  1. 用贪心算法解决马踏棋盘问题
  2. 最近为一个培训公司做的配置
  3. Winform中自定义xml配置文件后对节点进行读取与写入
  4. 【tensorflow】 GPU 显存分配设置
  5. 在Linux系统终端利用ggc,大学计算机:Linux下C编程.pdf
  6. 验证必须是数字php,Element 中表单非必填数据项 必须为数字的验证问题
  7. word转pdf出现空白页||去除PDF中的指定页
  8. 关于idea Tomcat部署的一个小坑
  9. 广西大学计算机英语复试的内容,广西大学计算机专业的研究生复试时
  10. Linux shell的条件判断、循环语句及实例
  11. 了解TrustZone,读了这篇就够了
  12. Burpsuite的CA证书安装
  13. 基于jenkins进行定制化开发
  14. 仿微软Video Indexer——视频断点播放与智能解析时间线的前端可视化实现
  15. S3C22440 JTAG连接不上
  16. android手机应用开发(一)
  17. 刘润直播预告 | 顶级高手,如何创造财富
  18. couldn‘t upgrade db schema: insert into ACT_GE_PROPERTY values (‘common.sche[已解决]
  19. 超级电容器-为你的设计提供一个峰值电源或二次电源
  20. 用matlab求函数极限,matlab求解极限问题(limit函数的用法)

热门文章

  1. 电脑数据存储工具----光盘驱动器
  2. go语言 mysql卡死_一次mysql死锁的排查过程-Go语言中文社区
  3. wpf mysql存储过程_MySQL存储过程的创建及调用
  4. msp430单片机 温度计编程_MSP430系列与89C5l系列的比较
  5. 谷歌浏览器的下载位置如何设置 Chrome浏览器下载路径设置方法简述
  6. win7本地连接不见了的修复方法
  7. java 并发 变量_实例讲解Java并发编程之变量
  8. utf8编码为什么这么普遍,优势在哪里?
  9. @DateTimeFormat注解
  10. 分析Spring容器启动流程 Spring初始化