How do I use 'data_files' in

Asked by Erigami on 2011-02-20

I'm trying to add icons to my app's .deb. I've done this by putting them in the data/media directory. I want them to end up in /usr/share/icons/gnome (or somewhere similar).

Question #138208 seems to suggest that I should edit to specify paths with a 'data_files' argument to setup(). When I do that, I get the following failure when I run 'quickly package':

Ubuntu packaging created in debian/
Command returned some WARNINGS:
** ( WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'
** ( WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'
** ( WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
WARNING: the following files are not recognized by
An error has occurred during package building
ERROR: package command failed

My now looks like:
    author='Erigami Scholey-Fuller',
    <email address hidden>',
    description='Monitor Your Application Usage',
    long_description='Monitor how long you use desktop applications.',
    cmdclass={'install': InstallAndUpdateDataDirectory},

Why does adding a 'data_files' argument to setup() cause failures in that config file? What's the appropriate way to add extra paths to the .deb?

Question information

English Edit question
Quickly Edit question
No assignee Edit question
Last query:
Last reply:
Tony Byrne (tony-badwolf) said : #1

Hi Erigami
 I had a look in in quickly's source'quickly',
      version="%s" % VERSION,
      description='build new Ubuntu apps quickly',
      long_description='Quickly enables for prospective programmer a way to easily build new ' \
                  'apps for Ubuntu based on templates and other systems for helping them ' \
                  'write their code in a guided manner. This also includes packaging and ' \
                  'deploying code.',
      license="GPL v3",
      author='Quickly Developer Team',
      <email address hidden>',
      data_files=[('share/quickly/templates/ubuntu-application/project_root', glob.glob('data/templates/ubuntu-application/project_root/')),
                  ('share/quickly/templates/ubuntu-pygame/project_root', glob.glob('data/templates/ubuntu-pygame/project_root/')),
                  ('share/quickly/templates/ubuntu-flash-game/project_root', glob.glob('data/templates/ubuntu-flash-game/project_root/'))],
      cmdclass={'install': InstallAndUpdateDataDirectory})

The glob.glob command returns a list so I tried

    data_files=[('/usr/local/share', ['data/media/background.png'])]

and it worked. If you find an expert you might get a better solution.

Can you help with this problem?

Provide an answer of your own, or ask Erigami for more information if necessary.

To post a message you must log in.