PY2DSC(1)
π PY2DSC π
okay bestie, gather round, because today we're talking about py2dsc β a little User Command that lives in section 1 of your manual, and it is literally the moment your cute lil Python package gets a whole Debian glow-up. πβ¨
β¨ NAME β¨
py2dsc β creates Debian source package from Python package π
like. that's it. that's the job. it takes your Python thing and makes it a Debian source package. iconic behavior fr fr. π
πΈ DESCRIPTION πΈ
the vibe is, you run it like this:
usage: py2dsc [options] distfile
or, if you just wanna know what's up:
usage: py2dsc --help
and in that first one, distfile is a .zip or .tar.gz file built with the sdist command of distutils. so like, you already ran sdist, you got your lil tarball or zip, and now py2dsc takes it from there. π¦
π OPTIONS π
here's the whole menu, no skips, no skimming, we eat every single one. π
--dist-dir,-dβ the directory where the final built distributions get dropped. (default='deb_dist') π--patch-already-applied,-aβ the patch was already applied. this is used when py2dsc calls sdist_dsc. π©Ή--default-distributionβ deprecated, bestie. see--suiteinstead. π«--suite,-zβ the distribution name to use if it's not specified in the.cfg. (default='unstable') π―--default-maintainerβ also deprecated. see--maintainer. π«--maintainer,-mβ the maintainer name and email to use if it's not specified in the.cfg. (default comes fromsetup.py) π--debian-versionβ the debian version. (Default:1) π’--extra-cfg-file,-xβ an additional.cfgfile, on top ofstdeb.cfgif that one's already there. π--patch-file,-pβ a patch file applied beforesetup.pyis called. heads up: this is incompatible with a file specified in the.cfg. β οΈ--patch-level,-lβ a patch file applied beforesetup.pyis called. and yeah, also incompatible with a file specified in the.cfg. β οΈ--patch-posix,-qβ apply the patch with--posixmode. π§©--remove-expanded-source-dir,-rβ remove the expanded source directory. π§Ή--ignore-install-requires,-iβ ignore the requirements fromrequires.txtin the egg-info directory. π--pycentral-backwards-compatibilityβ this option has no effect, it's here for backwards compatibility, and it may be removed someday. π--workaround-548392β also has no effect, also here for backwards compatibility, also may be removed someday. π--no-backwards-compatibilityβ same energy: no effect, backwards compatibility only, might get removed someday. π--guess-conflicts-provides-replacesβ if True, attempt to guess Conflicts/Provides/Replaces indebian/controlbased onapt-cacheoutput. (Default=False). π--with-python2β if True, build package for python 2. (Default=False). π--with-python3β if True, build package for python 3. (Default=True). π--no-python2-scriptsβ if True, do not install scripts for python 2. (Default=False). π«--no-python3-scriptsβ if True, do not install scripts for python 3. (Default=False). π«--force-x-python3-versionβ override the default minimumpython3:anydependency with the value from the x-python3- version. πͺ--allow-virtualenv-install-locationβ allow installing into/some/random/virtualenv-path. π--compat,-cβ Debian compatibility level. (Default=9) π§·--with-dh-virtualenvβ usedh_virtualenvto build the package instead ofpython_distutils. this is useful to embed an application with all its dependencies and dont touch to the system libraries. π¦--with-dh-systemdβ adds the systemd addon that willdh_systemd_enableanddh_systemd_starthelpers at the correct time during build. βοΈ--sign-resultsβ usegpgto sign the resulting.dscand.changesfile. π--sign-keyβ specify the signing key. π--ignore-source-changesβ ignore all changes on source when building the source package (adds the-i.*option todpkg-source). π«₯
okay real talk for one sec: a couple of these are literally no-ops kept around for backwards compatibility (--pycentral-backwards-compatibility,--workaround-548392,--no-backwards-compatibility) and they may be removed someday, so don't build your whole personality around them. also--default-distributionand--default-maintainerare deprecated β use--suiteand--maintainerinstead. and the patch-file/patch-level situation is incompatible with a file specified in the.cfg, so pick a lane bestie. π«Ά
aaaand that's the whole page! this was py2dsc version 0.10.2, from August 2025, and yes the footer said exactly that and we are mentioning it because the facts stay facts even when the vibe is a vibe. πβ¨ slay, go build your source package, mwah π
π¦ where this page comes from
- ubuntu resolute: python3-stdeb 0.10.2-1 Β· MIT
- ubuntu stonking: python3-stdeb 0.10.2-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms