[Distutils] extra files into the package dir

Rene Liebscher R.Liebscher@gmx.de
Wed Oct 18 08:36:01 2000

Pete Shinners wrote:
> i have some extra files i'd like to have copied into
> the destination package directory when installing.
> it seems that distutils only installs the .PY(C) files
> when installing a package directory. how can i tell
> distutils to copy my other files too?
> does this involve 'extending' the install command?
> i could probably do that if there were docs or an
> example of something like that.
I had a similar problem with PyOpenGL.
(It needs some data files for its examples.)
May be my solution is what you need.
(At least it could serve as an example.)

Look at the following address:

"my_install_data.py" extends distutils' install_data command.
"setup.py" uses then this alternative command.
(The important parts are at the end of this file.
One is the specification of this alternative install command
 = "cmdclass" parameter of the setup function.
The other is the "data_files" parameter to the setup function.)

Kind regards

Rene Liebscher