#
3.4 Distributing your extension modules

There are two ways to distribute extension modules for others to use. The way that allows the easiest cross-platform support is to use the `distutils` package. The manual Distributing Python Modules contains information on this approach. It is recommended that all new extensions be distributed using this approach to allow easy building and installation across platforms. Older extensions should migrate to this approach as well.

What follows describes the older approach; there are still many extensions which use this.

When distributing your extension modules in source form, make sure to include a Setup file. The Setup file should be named Setup.in in the distribution. The make file make file, Makefile.pre.in, will copy Setup.in to Setup if the person installing the extension doesn't do so manually. Distributing a Setup.in file makes it easy for people to customize the Setup file while keeping the original in Setup.in.

It is a good idea to include a copy of Makefile.pre.in for people who do not have a source distribution of Python.

Do not distribute a make file. People building your modules should use Makefile.pre.in to build their own make file. A README file included in the package should provide simple instructions to perform the build.