Debmutate is a set of Python modules for manipulating the control files of Debian packages, with the ability to preserve the existing formatting of the control files.
It's built on top of the excellent python-debian library, and was originally extracted from lintian-brush.
To modify one of the control files, use one of the context managers to edit the file.
For example, for debian/control:
from debmutate.control import ControlEditor
with ControlEditor(path='debian/control') as control:
print(control.source['Maintainer'])
control.source['Maintainer'] = "Jelmer Vernooij <jelmer@debian.org>"
Or for debian/changelog:
from debmutate.changelog import ChangelogEditor
with ChangelogEditor(path='debian/changelog') as editor:
editor.add_entry(['Some entry'])
Once you leave the context manager, the changes will be written to disk if there were any. If the editor is unable to preserve the formatting of the control file, it will raise a FormattingUnpreservable error.
If the control file that was edited was generated from another control file (e.g. debian/control.in), debmutate will attempt to update that file instead and then regenerate debian/control. If it is unable to do so, it will raise a GeneratedFile exception.
The file will be left as-is if an exception is raised, or if the .cancel() method is called.
debmutate currently provides editors for the following control files:
- debian/changelog
- debian/copyright
- debian/control
- debian/patches/series
- debian/tests/control
- debian/watch
- debian/maintscripts, debian/*.maintscripts
- debian/source/lintian-overrides, debian/*.lintian-overrides
- debian/debcargo.toml
Metadata
Release files for debmutate 0.82
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 |
|---|---|---|---|---|
| debmutate-0.82.tar.gz | 86.0 kB | Without provenance | Details for debmutate-0.82.tar.gz |
Release files / debmutate-0.82.tar.gz
| Download URL | debmutate-0.82.tar.gz |
|---|---|
| Size | 86.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2b8957c1ee380ebc0c86a72bda4df3aeb9c72c723307fb35b5e09660be9dc8f
|
|
BLAKE2b-256 checksum How to use checksums |
1f5f89b7aff8d913429a2bd9f6f8e53daf9dffc5a1a571b5455414e66c7aae1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for debmutate 0.82
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.