Distutils/Cookbook

This wiki is in the process of being archived due to lack of usage and the resources necessary to serve it — predominately to bots, crawlers, and LLM companies. Edits are discouraged.
Pages are preserved as they were at the time of archival. For current information, please visit python.org.
If a change to this archive is absolutely needed, requests can be made via the infrastructure@python.org mailing list.

Introduction

The Distutils Cookbook collects various useful recipes and tips for using the Distutils.

When creating new recipes, use the RecipeTemplate.

Recipes

  • /InstallDataScattered -- make resource data-files get installed in the same directory tree as the Python files that depend on them

  • /AutoDataDiscovery -- specify data-files to install with smart_install_data recursively by specifying only a top-level directory

  • /AutoPackageDiscovery -- specify packages to install recursively by specifying only the top-level package

  • /WininstFilename -- provide customisation point for altering the filename of bdist_wininst installer (such as to include numpy version information)