Python - Source Distribution (sdists)
Table of Contents
1 - About
Code Shipping - Source (Distribution|Archive) in Python.
Source distributions are also known as sdists for short.
2 - Articles Related
3 - Management
3.1 - Create
With Python 3 - SetupTools and its's Python - setup.py script.
cd /project
python setup.py sdist
3.2 - Root
Some projects use a src or lib subdirectory as the source root
- In Python - setup.py, <note tip>You will normally also declare your package with find-packages</note>
# for src
package_dir={'': 'src'}, # tell distutils packages are under src
packages=find_packages('src'),
# or for lib
package_dir={'': 'lib'},
packages=find_packages('lib'),
- in Python - setup.cfg
[options]
package_dir=
=src
packages=find:
[options.packages.find]
where=src
- On the command line
--egg-base=SOURCEDIR, -e SOURCEDIR