Skip to content

Instantly share code, notes, and snippets.

@v-lopez
Last active July 1, 2024 13:38
Show Gist options
  • Save v-lopez/de90bd8504aa03f4acdf8e073e9f9dae to your computer and use it in GitHub Desktop.
Save v-lopez/de90bd8504aa03f4acdf8e073e9f9dae to your computer and use it in GitHub Desktop.
python_debian_from_source

From: https://pypi.python.org/pypi/stdeb/0.8.5#examples

Example for package Reindent

Download source code: wget http://pypi.python.org/packages/source/R/Reindent/Reindent-0.1.0.tar.gz

You may need to install these dependencies: sudo apt install python3-all dh-python python3-stdeb

Alternatively, create a virtualenv:

virtualenv /tmp/deb_export
. /tmp/deb_export/bin/activate
pip install stdeb

From the directory where the tar ball is:

PKG=Reindent; echo $PKG && py2dsc `ls $PKG-*tar.gz` && cd deb_dist/$PKG-* && dpkg-buildpackage -rfakeroot -uc -us && cd .. && ls python*-$PKG*.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment