PYTHON-MKDEBIAN(1)
π PYTHON-MKDEBIAN π
okay bestie, so you know how the manual calls this PYTHON-MKDEBIAN(1) and files it under User Commands? Yeah. It's a little command-line cutie and she's about to change your whole packaging life. Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
python-mkdebian β the girl who generates a suitable Debian source package for a standard distutils application. no cap. she does the boring Debian Policy homework so you don't have to. π
π¦ SYNOPSIS π¦
python-mkdebian [options]
that's it. that's the whole vibe. you pass her some options and she goes to work.
πΈ DESCRIPTION πΈ
So here's the tea. This script generates a reasonably Debian Policy compliant Debian source package for a Python application β but only if that application uses distutils properly. Like, correctly correctly. She's picky, but in a fair way.
She assumes there are no public Python modules, and she generates just a single application binary package. One package. One icon. Main character energy. π
Where does she get her info? From the .egg-info file that setup.py generates. She pulls out:
- author
- project name
- description
- version
- upstream source
- license
- required and provided Python modules β and these get translated to Debian python library package names and automatically added as package dependencies. yes bestie, auto-deps. obsessed. πβ¨
She also generates a simple cdbs/python-support rules file.
π‘ Real talk:python-mkdebianwas designed to be used with theDistUtilsExtra.automodule, which calculates required Python dependencies automatically. That's her ideal collab.
But β and this is important β she makes no explicit assumptions about DistUtilsExtra. So if your setup.py has complete information, she will work with any distutils setup. She's flexible like that. π§
π OPTIONS π
okay this is the good part. the flags. let's go one by one, no skipping, we don't do that here.
--force-control=FORCE_CONTROLβ Force control file behaviour. She accepts exactly one of these three values:noneβ keep the control file unchangeddepsβ only update dependenciesfullβ recreate the whole file
And the default? It's deps, so by default only dependencies get updated. lowkey the safest option, highkey the smartest one.
--force-copyrightβ Force the whole copyright file to be recreated. By default she will not touch an already existing copyright file, so that you can customize it. she respects your edits, periodt. π«Ά--force-rulesβ Force the whole rules file to be recreated. Same deal: by default she will not touch an already existing rules file, so you can customize it. your rules, your world. β¨--changelog=CHANGELOGβ Add a changelog entry todebian/changelog. And yes, you can specify this multiple times. stack 'em up. π--dependency=PACKAGENAMEβ Add an additional Debian package dependency. Also can be specified multiple times. more deps, more love. π--prefix=PREFIXβ Ask for installing all your modules in the dedicatedPREFIX. The default is/usr. classic. iconic. π«--versionβ Show the program's version number and exit. short, sweet, informative.-h,--helpβ Show this help message and exit. when in doubt, ask for help, bestie. no shame in it. π
π SEE ALSO π
- Python help for the
distutilsmodule β go read it, iykyk π
π AUTHOR π
python-mkdebian is developed by Martin Pitt <martin.pitt@ubuntu.com>. absolute legend, we stan. π
and that's the whole page, bestie!! π this was python-mkdebian from the May 2010 release, living in the python-mkdebian section of your friendly neighbourhood User Commands manual. go forth and package responsibly. mwah. ππ¦πΈ
π¦ where this page comes from
- debian bookworm: python3-distutils-extra 2.50 Β· GPL-2.0-or-later
- debian trixie: python3-distutils-extra 3.1 Β· GPL-2.0-or-later
- ubuntu jammy: python3-distutils-extra 2.45 Β· GPL-2.0-or-later
- ubuntu noble: python3-distutils-extra 3.0 Β· GPL-2.0-or-later
- ubuntu questing: python3-distutils-extra 3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms