We will first explore the basics of creating Python source tarballs and then the creation of Debian packages from those tarballs.
5.1 Creating a Python Source Tarball
To create a Python source tarball, you have to write a setup.py script that uses distutils or setuptools. Then python setup.py sdist creates the tarball in the right format.
distutils is part of the Python standard library but lacks some commonly used features. setuptools adds these features by extending distutils. Which of these tools you use is mostly a matter of taste and context.