TOML-ADAPT(13)
π TOML-ADAPT(13) β toml-adapt π
okay bestie, welcome to the glow-up era of your toml files β¨ this is toml-adapt, a lil user command that adapts and manipulates toml files, and honestly? she ate.
πΈ NAME πΈ
toml-adapt β adapt/manipulate toml files π
β¨ SYNOPSIS β¨
toml-adapt [--help] [-path TEXT] [-path TEXT] [-dep TEXT] [-ver TEXT]
(yes bestie, -path TEXT really is in there twice, that's just how she is, no notes π
)
π¦ DESCRIPTION π¦
so like β working with TOML files is becoming inevitable during the package maintenance process in different ecosystems. it's giving unavoidable, fr fr π
many times package maintainers must either change the version of dependency or add/remove dependencies when building their packages, due to the inconsistent base system. for example, solving this issue can be done either by using the provided patches or using sed commands. however, this may be slightly time-consuming and irritating π© like, nobody has the energy.
so a very simple yet user-friendly command line interface was developed in order to make this process easier. and she's iconic for that. periodt. π
π₯ FEATURES π₯
CLI currently supports the following operations:
- adding/removing dependencies
- changing the dependency version
- changing the dependency versions of all packages concurrently
- adding/removing/changing dev dependencies
no cap, that's the whole roster and it's lowkey everything π
π SUPPORTED PACKAGING TOOLS π
the following packaging tools are currently supported by this software:
poetryflitcargojulia(partly)
ngl, julia is only partly supported β she's in her half-glow era, don't expect the full main character treatment π«Ά
π OPTIONS π
--helpβ show a help message and exit. classic. we love a helpful queen β¨-path TEXTβ specifies the path to the TOML file you wish to edit. [required] β she's mandatory bestie, no skipping π-a TEXTβ action. any of the following:add,remove,change,add-dev,remove-dev,change-dev. [required] β pick your move, it's required, the vibes demand it π-dep TEXTβ this option sets the name of dependency you wish to manipulate. reserved keywordALLwill instead do action on all dependencies. [required] β yes,ALLis the "do everything" button and she's powerful π-ver TEXTβ this option sets the version. with Python Poetry, there is reserved keywordX, which will become*(meaning it accepts any version of dependency). π
π EXAMPLES π
change dependency
toml-adapt -path pyproject.toml -a change -dep niaclass -ver 0.1.0
add dependency
toml-adapt -path pyproject.toml -a add -dep niaclass -ver 0.1.0
remove dependency
toml-adapt -path pyproject.toml -a remove -dep niaclass -ver 0.1.0
π§ OTHER EXAMPLES π§
change all existing dependencies in toml file:
toml-adapt -path pyproject.toml -a change -dep ALL -ver X
X represents a *
X really said "any version? say less" π«
π HOW TO USE IT IN SPEC FILES? π
%prep
...
# Make dependencies consistent with Fedora dependencies
toml-adapt -path pyproject.toml -a change -dep ALL -ver X
look at her go, matching Fedora dependencies like it's nothing π₯
and that's the whole page bestie!! π this gem dropped in November 2023, and the manual page is TOML-ADAPT(13) β go forth and adapt your tomls, you absolute icon π¦πβ¨
π¦ where this page comes from
- fedora 43: python3-toml-adapt 0.3.4-6.fc43 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms