locating data_files

D

Darren Hart

I'm using dist_utils to install some data along with my module, but I
haven't been able to sort out where that data gets installed from
within the module. The user can specify --prefix=/usr/local for
instance, how can I know where to look for the data files?

My setup.py installs a glade file and several png images for example:

data_files=[('share/braindump/images', ["images/countdown-00.png",
"images/countdown-01.png",
"images/countdown-02.png",
"images/countdown-03.png",
"images/countdown-04.png",
"images/countdown-05.png",
"images/countdown-06.png",
"images/countdown-07.png",
"images/countdown-08.png",
"images/countdown-09.png",
"images/countdown-10.png",
"images/countdown-11.png",]),
('share/braindump/glade', ['glade/braindump.glade']),
('share/braindump/glade', ['glade/braindump.png']),
('share/applications', ['data/braindump.desktop']),
('share/icons/hicolor/scalable/apps',
['data/icons/braindump.svg']),
('share/icons/hicolor/16x16/apps',
['data/icons/16x16/braindump.png']),
('share/icons/hicolor/22x22/apps',
['data/icons/22x22/braindump.png']),
('share/icons/hicolor/24x24/apps',
['data/icons/24x24/braindump.png']),
('share/icons/hicolor/32x32/apps',
['data/icons/32x32/braindump.png']),
('share/icons/hicolor/36x36/apps',
['data/icons/36x36/braindump.png']),
('share/icons/hicolor/48x48/apps',
['data/icons/48x48/braindump.png']),
('share/icons/hicolor/64x64/apps',
['data/icons/64x64/braindump.png']),
('share/icons/hicolor/72x72/apps',
['data/icons/72x72/braindump.png']),
('share/icons/hicolor/96x96/apps',
['data/icons/96x96/braindump.png']),
('share/icons/hicolor/128x128/apps',
['data/icons/128x128/braindump.png']),
('share/icons/hicolor/192x192/apps',
['data/icons/192x192/braindump.png']),
('share/icons/hicolor/256x256/apps',
['data/icons/256x256/braindump.png'])],

How can I determine the full path to those images from within the module?

GUI(os.path.join(WHAT_IS_THE_PREFIX, "share/braindump/glade/braindump.glade"))

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top