skillfed

stdeb

Python to Debian source package conversion utility

stdeb v0.11.0 386.7K downloads/30d#7,050 on PyPI504
Permissive license MIT AGING released

What it is and what it does

stdeb is a distutils/setuptools extension that automates the conversion of Python packages into Debian source packages (.dsc) and binary packages (.deb files). It provides new distutils commands—sdist_dsc, bdist_deb, install_deb, and debianize—that handle the boilerplate of Debian packaging, including control file generation, changelog creation, and dependency mapping. The package also includes standalone utilities (py2dsc, py2dsc-deb, pypi-download, pypi-install) for downloading packages from PyPI and building or installing them as .deb files.

The tool is designed for developers and system administrators who need to package Python applications for Debian-based systems. It supports building packages for Python 2, Python 3, or both from a single source, with customization options for Debian metadata, dependencies, and build flags. As of version 0.11.0, stdeb requires Python 3.7+ to run and uses debhelper 12+ with pybuild for the generated packages.

Use it for:

  • Package a Python application for distribution on Debian/Ubuntu systems without manually writing debian/ directory structure.
  • Build .deb files from PyPI packages for internal deployment or repository hosting.
  • Automate Debian packaging in CI/CD pipelines to generate installable binaries from Python source.
  • Create both Python 2 and Python 3 variants of a package from a single codebase using the --with-python2/--with-python3 flags.
  • Customize Debian package metadata (dependencies, maintainer, homepage) via stdeb.cfg configuration file.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Python packages into Debian source and binary packages (.deb files) via distutils commands, with utilities to download, build, and install Debian packages from PyPI.

Yes—if you need to package Python applications for Debian/Ubuntu systems. stdeb eliminates manual debian/ directory creation and integrates cleanly into existing setuptools workflows. Install friction is minimal, maintenance is steady (recent commits, no known vulnerabilities), and the MIT license is unrestricted. The aging status reflects infrequent releases rather than abandonment; the tool is stable and fit for production use.

Install

stdeb on PyPI

pip

pip install stdeb

uv

uv add stdeb

poetry

poetry add stdeb

Installing stdeb

Before you install

Low friction—pure Python wheel with no runtime dependencies. Maintenance is aging (336 days since last release), but the repository is active and recent (last commit 2025-09-12), suggesting occasional updates rather than abandonment.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution of stdeb itself or packages built with it.

Quickstart

pip install stdeb

python3 setup.py --command-packages=stdeb.command sdist_dsc
python3 setup.py --command-packages=stdeb.command bdist_deb

Requires Python 3.7+; minimum debhelper version 12 on the target Debian/Ubuntu system; distutils or setuptools in the Python environment.

Verify before relying

  • Whether stdeb can reliably generate Python 2 packages from Python 3 (described as 'not well tested' in the description).
  • Compatibility with modern Debian/Ubuntu releases beyond what the description explicitly lists.
  • Whether the pybuild-based build system (as of 0.11.0) introduces any breaking changes for existing workflows.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 336 days since the last release
Last repo commit
First released
Downloads 386,722/month — #7,050 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: stdeb-0.11.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 2.7Programming Language :: Python :: 3

Tags

python to debian package conversionbuild deb files from python packagescreate debian packages from pypidistutils debian packagingpython package debianizationsdist_dsc bdist_debpy2dsc debian build tool
debian-packagingdistutils-extensiondeb-builder

More Build Tools packages