Debian package making utility
Project description
debmake-unofficial
⚠️ Unofficial PyPI distribution of debmake. See details below.
This repository provides an unofficial PyPI package for debmake, a Debian packaging tool.
Important
- This is not the official upstream project
- Upstream is maintained by Debian developers
- This repository exists only to make installation via
pip,pipxanduveasy
Installation
# with pip
pip install debmake-unofficial
# with uv
uv tool install debmake-unofficial@latest # Install debmake globally.
# with pipx
pipx install debmake-unofficial
Original README
This is the new debmake program written in Python. This provides convenient command to make a Debian package from the upstream VCS/tarball/source-tree.
This is available as the "debmake" package on Debian.
- Homepage: https://salsa.debian.org/debian/debmake
- Default branch: main
- Major refactor happened 5.0.0-5.1.0 (No mote -a -t -T -l -c ....)
- Now optional positional argument can specify:
- tarball URL
- git repository URL
- PATH to source tree
- PATH to tarball
See the HTML files in the "debmake-doc" package for the introductory guide.
General source structure
The src/debmake/__main__.py is provides the entry point and backbone of the
debmake command. Its code flows as follows:
debmake.para.para-- this is the command line parserdebmake.debs.debs-- parse-bspec and returnpara["debs"]debmake.analyze.analyze-- analyze source tree to identify its build systemdebmake.control.control-- write outdebian/controlconfiguration filedebmake.debian.debian-- write out otherdebian/*configuration files
License for the entire source
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FILES outside of src/debmake/data/
- Copyright © 2013-2026 Osamu Aoki osamu@debian.org
FILES inside of src/debmake/data/
- Copyright © Jim Van Zandt jrv@debian.org
- Copyright © Santiago Vila sanvila@ctv.es
- Copyright © Dirk Eddelbuettel edd@debian.org
- Copyright © Nils Naumann naumann@unileoben.ac.at
- Copyright © Jim Van Zandt jrv@debian.org
- Copyright © 2013-2026 Osamu Aoki osamu@debian.org
Some of these are originally generated by the output of the dh_make command. The output has been edited by Osamu Aoki to fit into this package. The dh-make package came with the GPL license with the following permissive exception:
As a special exception, when the template files are copied by dh-make into dh-make output files, you may use those output files without restriction. This special exception was added by Craig Small in version 0.37 of dh-make.
Since this exception is permissive, I am releasing the entire source package under permissive MIT license as above.
History
The author thanks previous efforts on this topic (GPL):
- debmake: command: deb-make, version up to 3.8 (shell script)
- 1996-1997 Christoph Lameter clameter@debian.org
- 1997-2006 Santiago Vila sanvila@debian.org
- dh-make: command: dh_make (perl script)
- 1998-2012 Craig Small csmall@debian.org (This is active project in 2021. Around 2016, dh-make was ported to python code base with major updates.)
- Since version 5.0.0 in 2026 of debmake, license check functionality is delegated to licensecheck
How to install
Debian/Ubuntu package to a system:
$ sudo apt-get install debmake
For other POSIX system, you can create a wheel package and install it with pip in the virtual environment. For example.
$ mkdir -p path/to/venv
$ python3 -m venv path/to/venv
$ source path/to/venv/bin/activate
(venv) $ cd path/to/debmake
(venv) $ python3 -m build
(venv) $ pip install dist/debmake*.whl
How to modify as contributor
- Check-out default branch "main": $ git clone https://salsa.debian.org/debian/debmake.git
- Make modification to "main" branch (or your private topic branch and send us your pull request or patch).
How to update as upstream before release
- Update
src/debmake/__init__.pywith new upstream version5.1.3 - Add a new entry to the debian/changelog with the new upstream version
("
dch -i" creates entry such as5.1.2--> change to5.1.3) - When debmake command line interface changes:
- Check the latest CLI using "
debmake -h" - update asciidoc/manpage.txt in debmake-doc package
- generate a new
debmake.1file in its source wuth "make debmake.1" - copy generated
debmake.1file intomanpages/debmake.1
- Check the latest CLI using "
- Tag it with upstream version
upstream/5.1.3and build with
$ git tag -s 5.1.3
$ git deborig
$ sbuild
- Clean source tree with
$ git clean -d -f -x
- Make source only upload.
$ dgit push-source
(Initial dgit transition needs more work with --deliberately-not-fast-forward
or --overwrite. See dgit-maint-merge(7))
Please follow PEP-8 as much as possible.
- format source with "black" and "isort"
- check source with "pyright" if possible
- indent 4 spaces
- 80 char/line
Debug the source code without installing it as deb package
The source code can be tested by installing its wheel package to your user's venv environment.
$ mkdir -p path/to/venv
$ python3 -m venv path/to/venv
$ source path/to/venv/bin/activate
(venv) $ pip install dist/debmake*.whl
Here, I install debmake module into a python virtual environment.
Now debmake script providing debmake equivalent command
can be executed from the command line for debugging.
$ debmake [-h] [-n] [URL]
There are other ways to test code in place without installing them. One way is
to set up the module loading path $PYTHONPATH to src/; and the command
search path $PATH to be extended to include src/debmake/ respectively from
where setup.py is found by sourcing as:
$ source setenv
Script ./__main__.py providing /usr/bin/debmake equivalent available under this
shell environment.
Since setting proper environment variables $PATH and $PYTHONPATH or
executing a command from a particular path are confusing, I don't recommend
testing code in place.
Hints for reading the source
How copyright files are scanned by debmake in normal usage?
normal execution --> debmake/debian.py debian()
+-> calling licensecheck to make debian/copyright
+-> other debian/* files made from template files
(PATH are relative to src/)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file debmake_unofficial-5.1.5.tar.gz.
File metadata
- Download URL: debmake_unofficial-5.1.5.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
649bb3daa9c6d33ae00a8ee309c2c657bb7a314fbb0e99a7a784bd0b9ca1548a
|
|
| MD5 |
5c6b732a57a534433f5a27abe6a3ecdf
|
|
| BLAKE2b-256 |
aa326a8e128bb6b3e34716c996c24a02a8c649e7dceb5cba729f0a53203d0147
|
Provenance
The following attestation bundles were made for debmake_unofficial-5.1.5.tar.gz:
Publisher:
python-publish.yml on 5wHN28Dg/debmake-unofficial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debmake_unofficial-5.1.5.tar.gz -
Subject digest:
649bb3daa9c6d33ae00a8ee309c2c657bb7a314fbb0e99a7a784bd0b9ca1548a - Sigstore transparency entry: 985804576
- Sigstore integration time:
-
Permalink:
5wHN28Dg/debmake-unofficial@aaceb49b854c5c3b17be57ed5a31f05113ea166b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/5wHN28Dg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aaceb49b854c5c3b17be57ed5a31f05113ea166b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file debmake_unofficial-5.1.5-py3-none-any.whl.
File metadata
- Download URL: debmake_unofficial-5.1.5-py3-none-any.whl
- Upload date:
- Size: 90.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45415a9cdbd75c8a928bf13772502844feb1e00dcd25d4961247fc840b90dc7
|
|
| MD5 |
57968d173745ba0eaa835922f27cb715
|
|
| BLAKE2b-256 |
09675d1b9cba1ad6aaad43cb69f5c27604520084e115a2ca7802733496217d72
|
Provenance
The following attestation bundles were made for debmake_unofficial-5.1.5-py3-none-any.whl:
Publisher:
python-publish.yml on 5wHN28Dg/debmake-unofficial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
debmake_unofficial-5.1.5-py3-none-any.whl -
Subject digest:
d45415a9cdbd75c8a928bf13772502844feb1e00dcd25d4961247fc840b90dc7 - Sigstore transparency entry: 985804582
- Sigstore integration time:
-
Permalink:
5wHN28Dg/debmake-unofficial@aaceb49b854c5c3b17be57ed5a31f05113ea166b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/5wHN28Dg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@aaceb49b854c5c3b17be57ed5a31f05113ea166b -
Trigger Event:
workflow_dispatch
-
Statement type: