跳转到主要内容

Comps XML文件操作库

项目描述

libcomps

Libcomps是yum.comps库的替代品。它是一个以纯C编写的库,具有Python绑定。

构建

需求

自动构建系统

libcomps库

Python绑定

C库测试

文档构建

rpm构建

构建

  1. 克隆此仓库 git clone https://github.com/rpm-software-management/libcomps.git

  2. 从检出目录

     mkdir build
     cd build/
     cmake ../libcomps
     make
    
  3. 构建文档

     make docs
     make pydocs
    

构建 rpm 包

您可以使用 tito 来构建 rpm 包。从检出目录

    tito build --rpm --test

构建 Python 包

要创建二进制 "wheel" 发行版,使用

python setup.py bdist_wheel

要创建源发行版,使用

python setup.py sdist

安装源发行版需要安装包的安装程序在其系统上安装所有构建依赖项,因为它们在安装过程中编译代码。二进制发行版是预先编译的,但它们可能在不同的系统之间不可移植,例如 Fedora 和 Ubuntu。

注意:如果您在具有较旧版本 Pip 的系统上构建 bdist 或安装 sdist,您可能需要先安装 scikit-build Python 包。

要安装这些包中的任何一个,使用

pip install dist/{{ package name }}

要创建 libcomps 的 "可编辑" 安装,使用

python setup.py develop

注意:要重新编译库和二进制文件,您必须重新运行此命令。

安装

  • 构建成功后运行:make install
  • 或安装 rpm 包

测试

构建后,您可以在 tests 目录 中找到 C 库的测试,以 test_ 前缀开始。绑定测试位于(目前)与 Python 绑定库相同的目录中。您可以通过运行 python __test.pypython3 __test.py(即使没有安装库)来进行测试绑定。此外,此 unittest 还充当 Python 绑定的文档(目前)。

文档

构建后,文档位于 docs 目录 中。文档以 html、xml 和 latex 格式构建。目前只有 C 库的不完整文档可用。查看绑定 unittest __test.py__ 了解 Python 绑定使用。

贡献

这是将您的工作合并到项目中的最直接方法。

  1. 分支项目

  2. 克隆您的分支

  3. 实现您的功能或错误修复并提交更改

  4. 如果更改修复了 Red Hat bugzilla 中的错误,或者如果它对最终用户很重要,请将以下块添加到提交信息中

    = changelog =
    msg:           message to be included in the changelog
    type:          one of: bugfix/enhancement/security (this field is required when message is present)
    resolves:      URLs to bugs or issues resolved by this commit (can be specified multiple times)
    related:       URLs to any related bugs or issues (can be specified multiple times)
    
    • 例如:

      = changelog =
      msg: Do not skip type=mandatory in xml output
      type: bugfix
      resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1771224
      
    • 为了您的方便,您还可以使用 git 提交模板。在项目的顶级目录中运行以下命令

      git config commit.template ./.git-commit-template
      
  5. 将分支推送到您的分支

  6. 为您的分支发送拉取请求

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定要选择哪个,请了解更多关于 安装包 的信息。

源分发

libcomps-0.1.21.post1.tar.gz (3.7 MB 查看哈希值

上传时间

构建分发

libcomps-0.1.21.post1-cp312-cp312-manylinux_2_28_x86_64.whl (1.2 MB 查看哈希值

上传时间 CPython 3.12 manylinux: glibc 2.28+ x86-64

libcomps-0.1.21.post1-cp311-cp311-manylinux_2_28_x86_64.whl (1.2 MB 查看哈希值)

上传时间: CPython 3.11 manylinux: glibc 2.28+ x86_64

libcomps-0.1.21.post1-cp311-cp311-manylinux_2_28_aarch64.whl (1.1 MB 查看哈希值)

上传时间: CPython 3.11 manylinux: glibc 2.28+ ARM64

libcomps-0.1.21.post1-cp310-cp310-manylinux_2_28_x86_64.whl (1.1 MB 查看哈希值)

上传时间: CPython 3.10 manylinux: glibc 2.28+ x86_64

libcomps-0.1.21.post1-cp39-cp39-manylinux_2_28_x86_64.whl (1.1 MB 查看哈希值)

上传时间: CPython 3.9 manylinux: glibc 2.28+ x86_64

libcomps-0.1.21.post1-cp39-cp39-manylinux_2_28_aarch64.whl (1.1 MB 查看哈希值)

上传时间: CPython 3.9 manylinux: glibc 2.28+ ARM64

由以下提供支持