Skip to main content

Python library to parse makedeb-styled SRCINFO files

Project description

makedeb-srcinfo

PyPI

makedeb-srcinfo is a Python library to aid in the parsing of makedeb-styled SRCINFO files.

Installation

Install the makedeb-srcinfo package from PyPI:

pip install makedeb-srcinfo

Usage

from makedeb_srcinfo import SrcinfoParser

with open(".SRCINFO", "r") as file:
    data = file.read()

# Parse a SRCINFO file.
srcinfo = SrcinfoParser(data)

# Get all references of a variable (returned in a tuple).
pkgname = srcinfo.get_variable("pkgname")
arch = srcinfo.get_variable("arch")

# Get all references of a variable plus it's extensions (i.e. 'depends' and 'focal_depends').
# Results are returned in a dict with a tuple of (distro, arch) for the key name:
#   {
#      ("focal", None): ("gimp", "krita"),
#      ("focal", "amd64"): ("gcc", "golang-go")
#   }
depends = srcinfo.get_extended_variable("depends")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

makedeb-srcinfo-0.1.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

makedeb_srcinfo-0.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file makedeb-srcinfo-0.1.1.tar.gz.

File metadata

  • Download URL: makedeb-srcinfo-0.1.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for makedeb-srcinfo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 06085c382d203daf0d0933f7ce57ef53053e205a14302f1d378db694f19d333f
MD5 d0adac3c0bce5327b337b54faa45ba0e
BLAKE2b-256 6ca92513c64efe7dbdf033b33cfe3b0e7d67f1c7c5b9d05a97a382412893dfc7

See more details on using hashes here.

File details

Details for the file makedeb_srcinfo-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for makedeb_srcinfo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de4f164a680cfe1fcbbb9ebccf35189e99647ea9787fe32b585ceccd6444a024
MD5 62859debef87ea17fbb3ab0aba33b8f2
BLAKE2b-256 b6fd09285d159ef5f7fb669d891dadff924680d581bcabb8e2e35b9a5376d650

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page