dh_in...ebputy(1)
π NAME π
okay bestie, so dh_installdebputy is literally the tool that installs debputy plugins for your debhelper packages. that's the whole vibe. π
this lil cutie lives in the dh_in...ebputy(1) manual page, and if you're reading this, you're in the right place. π¦
β¨ SYNOPSIS β¨
dh_installdebputy [debhelper options] [-- params]
πΈ DESCRIPTION πΈ
so dh_installdebputy is a tool for installing debputy plugins from a package built using debhelper. that's it, that's the girl. she shows up, she installs the plugins, she leaves. main character energy only. π
π OPTIONS π
- standard debhelper options (such as
-p) β bestie, these are the classic debhelper flags you already know and love. please seedebhelper(7)for the full tea. π
π DIRECTORIES π
debian/debputy-plugins/debian/PACKAGE.debputy-plugins/
these two directories are where your plugin(s) and their related support files live. and listen β unlike most debhelper-ish tools out there, these have to be directories, not files. not me being picky, it's just how she is. π
inside each directory, you place the JSON descriptor file plus (if it's relevant) the related Python code and tests. so like, for a plugin named my-plugin installed into a package, you'd probably see something like:
debian/package.debputy-plugins/my-plugin.json
debian/package.debputy-plugins/my_plugin.py
debian/package.debputy-plugins/my_plugin_check.py
now, if you provided any tests, they'll get run when the plugin is installed β provided that py.test is available. so consider adding python3-pytest <!nocheck> to your Build-Depends for exactly that reason. iykyk. β¨
also, the tests can get picked up by the autopkgtests framework if you add autopkgtest-pkg-debputy to the Testsuite field in debian/control. slay. π
oh and btw, you can absolutely have multiple test files:
debian/package.debputy-plugins/my-plugin.json
debian/package.debputy-plugins/my_plugin.py
debian/package.debputy-plugins/my_plugin_check_foo.py
debian/package.debputy-plugins/my_plugin_check_bar.py
if you ever find yourself fighting with upstream's Python test runner picking up the debputy test, then please go review the "DEALING WITH UPSTREAM'S PYTHON TEST RUNNER" section, because we have ways to deal with that. π«Ά
π DEALING WITH UPSTREAM'S PYTHON TEST RUNNER π
so there are multiple ways to deal with upstream's python test runner picking up the debputy test. this section is written assuming upstream is using py.test (sometimes invoked as python3 -m pytest). the concepts should carry over to other test runners, but ngl the examples and configuration names will probably not be directly reusable. fair warning. β οΈ
the "least" effort option is to use _check instead of _test in the naming of the debputy tests. this will work for clean builds, as long as the py.test run can still load the modules (which often assumes that debputy is installed). however β on unclean builds (dpkg-buildpackage -nc), py.test can get confused because the module implementation file is both in debian/pkg.debputy-plugins and in debian/pkg. you can rm the version under debian/pkg manually, but bestie, it gets tedious. π
a more involved fix is to tell py.test to either stay away from the debian directory via norecursedirs, OR explicitly tell it where to find the source and tests (pythonpath + testpaths). if upstream uses pyproject.toml, it could look something like:
[tool.pytest.ini_options]
# Option A: Stay out of the "debian" dir.
norecursedirs = [
"debian",
]
# Option B: Explicitly lists where the source and tests are.
# In this case, `py.test` will work out of the box (without resorting
# to "python3 -m pytest" or similar tricks). This approach may have
# value for upstream for that particular reason.
pythonpath = [
"src",
]
testpaths = [
"tests",
# You may need "src" here if upstream uses --doctest-modules
]
the upstream fix will also prevent py.test from picking up the plugin inside the debian/package directory, which makes it more robust for dpkg-buildpackage -nc builds. periodt. π₯
β SEE ALSO β
this program integrates into the debhelper suite. she's a team player, your honor. π
π AUTHOR π
Niels Thykier <niels@thykier.net>
and that's the whole page bestie!! this was perl v5.42.3, dated 2026-10-04, from the dh_in...ebputy(1) manual β ty for coming to my ted talk, go install some plugins, mwah ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: dh-debputy 0.1.96 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms