Projects with files

Asked by Jonathan Kossick on 2011-10-22

When I build the package of my programm the most Files are missing. I think they were not moved.
What can I do to fix this problem?

Question information

English Edit question
Quickly Edit question
No assignee Edit question
Solved by:
Jonathan Kossick
Last query:
Last reply:

This question was reopened

Tony Byrne (tony-badwolf) said : #1

Hi Jonathan

When I do this
$quickly create ubuntu-application initok
$cd initok
$ls -R |grep __init__

I see 2 entries for
which are
initok/ and initok_lib/

$quickly package
$ cd ..
and I look in initok_0.1_all.deb with file-roller
$ file-roller initok_0.1_all.deb
i can see /usr/share/pyshared/initok/ and /usr/share/pyshared/initok_lib/
which is exactly what I expected
Can you give more details of your problem

Jonathan Kossick (j-kossick) said : #2

I fixed the problem but I don't really know the reason for the problem, because I had only to copy the from another folder in this folder. The new file has contrary to the old __init__py an icon in nautilus.

I also found the "data_files=[" option which is very useful but is there also an option to insert a whole folder?

Thanks for the help!

Tony Byrne (tony-badwolf) said : #3

Hi Jonathan

Have a look at
import glob

data_files=[('/destination', glob.glob('source_folder/*'))]

glob,glob will create a list of all the files in the source_folder.

Jonathan Kossick (j-kossick) said : #4

Thank you!! Problem solved!

Jonathan Kossick (j-kossick) said : #5

One last question: Is there a possibillity do give permissions to the files you insert with the data_folder[ option? The file is in the pyshared/my_project/directory.

Jonathan Kossick (j-kossick) said : #6

I changed the path of the files to the home directory, so I dont have this problem anymore.