[Distutils] Packaging of files, which aren't in the package root folder

Tarek Ziadé ziade.tarek at gmail.com
Mon Dec 14 12:30:20 CET 2009

2009/12/14 Lukas Hetzenecker <LuHe at gmx.at>:
> Hello,
> i just found this solution and is seems to work for my application:
> import os
> from distutils.core import setup
> # Install data files to package directory
> from distutils.command.install import INSTALL_SCHEMES
> for scheme in INSTALL_SCHEMES.values():
>    scheme['data'] = scheme['purelib']

Hacking the schemes that way can get you in trouble if the end user system
runs a command that work with the schemes.

Another clean way to achieve this is to copy those files temporarely
in the pc directory
in your release process, so your files will be in a *package* declared
in packages and then you can use package_data together with



More information about the Distutils-SIG mailing list