Skip to content

Instantly share code, notes, and snippets.

@pbelskiy
Last active September 15, 2022 14:46
Show Gist options
  • Save pbelskiy/00e3239cab2a7eee9c2f030f1a0600da to your computer and use it in GitHub Desktop.
Save pbelskiy/00e3239cab2a7eee9c2f030f1a0600da to your computer and use it in GitHub Desktop.
Python package distributing

Python package distribution overview

python


Have you ever heard about such words when you working with Python? easy_install, pip, distutils, setuptools, sdist, bdist, egg, wheel, twine, pypi let's structuring knowledge about it.

  • pip (using nowadays, was added in 2008)
  • easy_install (was added in 2004, don't support packages uninstall)

The tool pip can be used to install a package from PyPI. It replaces an earlier tool named easy_install.

  • setuptools (2004)
  • distutils (1998) Setuptools is a collection of enhancements to the Python distutils that allow developers to more easily build and distribute Python packages
  • sdist (source distribution)
  • bdist (built distribution)
    • egg (bdist_egg)
    • wheel (bdist_wheel)

What are Eggs and Wheels?

Both are built distribution formats for packages. Wheels have replaced Eggs as the preferred format. Installer pip supports only Wheels while Eggs can be installed with the older easy_install tool. Wheels don't include compiled Python files. In a built distribution, files and metadata are included.

Deploy infrastructure

  • PyPI (package repository)
  • twine (Twine is the tool that has to be used to publish packages on PyPI)

Used resources:

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