[Barry Warsaw, 2010-01-31] > On Jan 31, 2010, at 08:53 PM, Umang wrote: > > >But I'll never find my data files in sys.prefix + > >path_i_asked_distutils_to_install_to. So what according to you, is the > >right way to go about distributing? This situation is definitely not ideal. > > The Pythonic way (IMO) is to use pkg_resources:
... and when one will want to follow FHS and use --install-data (provided by Python, sic!) acordingly, it will fail, at least in Python << 2.7 also: pkg_resources is not in standard library, so I'd use one of these: * use something that keeps track of --install-data equivalent (f.e. automake or even pure Makefiles, if possible) * adjust setup.py to do what distutils/setuptools/distribute doesn't (save locations in .py files at install time) * postpone the release date until Python developers will include something based on pkg_resources in stdlib (that works fine with --install-data) ;-) anyway, even if you'll decide to hardcode the path somewhere, please at least make it in *one* place (so that it will be easier to patch). -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
signature.asc
Description: Digital signature