Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2380 > unrolled thread

Location of data files

Started byMatthias-Christian Ott <ott@mirix.org>
First post2011-04-01 20:37 +0200
Last post2011-04-01 20:37 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Location of data files Matthias-Christian Ott <ott@mirix.org> - 2011-04-01 20:37 +0200

#2380 — Location of data files

FromMatthias-Christian Ott <ott@mirix.org>
Date2011-04-01 20:37 +0200
SubjectLocation of data files
Message-ID<mailman.90.1301684005.2990.python-list@python.org>
Hi,

I want to include data files with a python package. With distutils it
seems common to specifiy these files in the data_files argument with a
non-portable location (e.g. data_files=[('share/example', 'icon.png')]).
Another approach is to include the file in the Python module of the
package (e.g. example/data) and specify the submodule in package_data
argument and load them via pkgutil or pkg_ressources. This method seems
portable, but doesn't allow customisation and doesn't conform to the
FHS.

What is the recommended way to allow easy platform-specific packaging
(e.g. data files are installed to /usr/share when requested), portability and
customisation (i.e. data files can be replaced by the user or
alternative locations can be specified)?

Regards,
Matthias-Christian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web