makedeb-srcinfo
makedeb-srcinfo is a library for Rust and Python to parse makedeb-style .SRCINFO files.
The library itself is written in Rust, and bindings for Python are made possible via PyO3 and Maturin.
Usage
Installation
You'll first need to install the library before using it. Installation instructions will change depending on if you're using the Rust or Python library:
Rust
cargo add makedeb-srcinfo
Python
pip install makedeb-srcinfo
Using the library
The Rust and Python libraries are designed to look quite similar to each other, both interfaces use the same function/class names, and should only differ in how the languages themselves are designed.
Rust
See the documentation on Docs.rs for full usage instructions.
use makedeb_srcinfo::SrcInfo;
use std::fs;
fn main() {
let file = fs::read_to_string(".SRCINFO").unwrap();
let srcinfo = SrcInfo::new(&file).unwrap();
// Get the package base.
println!("The package base for this package is {}.", srcinfo.get_string("pkgbase").unwrap());
// Get any dependencies.
match srcinfo.get_array("makedepends") {
Some(makedepends) => {
println!("Found {} build dependencies:", makedepends.len());
for dep in makedepends {
println!("- {}", dep);
};
},
None => {
println!("Found no dependencies.");
}
}
}
Python
Note Help is currently needed to get Python documentation automatically published on new releases. Please see https://github.com/makedeb/makedeb-srcinfo/issues/3 if you'd like to help.
#!/usr/bin/env python3
from makedeb_srcinfo import SrcInfo
with open(".SRCINFO") as file:
data = file.read()
srcinfo = SrcInfo(data)
# Get the package base.
pkgbase = srcinfo.get_string("pkgbase")
print(f"The package base for this package is {pkgbase}.")
# Get any dependencies.
makedepends = srcinfo.get_array("makedepends")
if len(makedepends) == 0:
print("Found no build dependencies.")
else:
print(f"Found {len(makedepends)} build dependencies:")
for dep in makedepends:
print(f"- {dep}")
Metadata
Release files for makedeb-srcinfo 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| makedeb_srcinfo-0.8.1.tar.gz | 23.9 kB | Without provenance | Details for makedeb_srcinfo-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| makedeb_srcinfo-0.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details for makedeb_srcinfo-0.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
Total release size: 620.2 kB
Release files / makedeb_srcinfo-0.8.1.tar.gz
| Download URL | makedeb_srcinfo-0.8.1.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a99f31ad2c59c9b4a8b9f256573f2b8413ef7fd0cdb39bb027d0176b4fe8ad92
|
|
BLAKE2b-256 checksum How to use checksums |
2cd4a557e0c8ac1d70b3346cff5bd66cc16ac430c39866fe6bc13ccbe91c3118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.14.0-beta.7
|
Release files / makedeb_srcinfo-0.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | makedeb_srcinfo-0.8.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 596.2 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
aec64fcdae5b0b147eb15f8cc16d40800aef7448b301359d78777e9d1b2e27c5
|
|
BLAKE2b-256 checksum How to use checksums |
db58f2b48b70e9be4e185f74b00d1fd73d9c3dd2ba2736de064a155849878626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.14.0-beta.7
|
Security for makedeb-srcinfo 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.