On Jun 17, 2005, at 2:49 PM, Chris Barker wrote: > Hi all (but mostly Bob) > > I'm having trouble with bdist_mpkg and the matplotlib data dir. In > setup.py, data_files is defined as: > > [('share/matplotlib', ['fonts/afm/cmex10.afm', 'fonts/afm/cmmi10.afm', > 'fonts/afm/cmr10.afm', 'fonts/afm/cmsy10.afm', 'fonts/afm/cmtt10.afm', > 'fonts/afm/pagd8a.afm', 'fonts/afm/pagdo8a.afm', > ... > > (there are lots more, but you get the idea). > > I guess this means that the files listed should all go into > "share/matplotlib" > > If I install with "setup.py install" they end up in: > > /Library/Frameworks/Python.framework/Versions/2.4/share/matplotlib > > but when I use bdist_mpkg, they get put in: > > /usr/local/share/share/matplotlib > > Note the double "share".
That's probably a bug, but it should probably happen with Python 2.3 also. Can you reproduce there? > As a result, matplotlib can't find them. I think it's looking in > > /usr/local/share/matplotlib > > without the double share. > > so, two questions: why is it putting it in /usr/local at all? I'd > prefer > that python packages just stay in the python tree. However, that's a > taste issue, I suppose. More importantly how can we get rid of the > extra > "share"? For framework builds of Python, bdist_mpkg currently defaults scripts and data into /usr/local instead of in-framework. This is especially important for the Apple framework, but not as much for the others. Using data_files in this manner at all is usually the wrong thing to do anyway. Python packages should really put the files they need into the package, not some semi-random location on the filesystem. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig