Python - Source Distribution (sdists)

1 - About

Code Shipping - Source (Distribution|Archive) in Python.

Source distributions are also known as sdists for short.

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


# 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


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap