2.7 Installing Additional FilesThe data_files option can be used to specify additional files needed by the module distribution: configuration files, message catalogs, data files, anything which doesn't fit in the previous categories. data_files specifies a sequence of (directory, files) pairs in the following way:
setup(... data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), ('config', ['cfg/data.cfg']), ('/etc/init.d', ['init-script'])] ) Note that you can specify the directory names where the data files will be installed, but you cannot rename the data files themselves.
Each (directory, files) pair in the sequence specifies the
installation directory and the files to install there. If
directory is a relative path, it is interpreted relative to the
installation prefix (Python's
You can specify the data_files options as a simple sequence
of files without specifying a target directory, but this is not recommended,
and the See About this document... for information on suggesting changes. |