What is the standard location for GtkBuilder file?

Asked by Francesco Fumanti on 2010-02-10

Hi,

I am trying to package a new version of the python application onboard that ships in main, but I don't know what is the standard location for the GtkBuilder file. (I am one of the upstream maintainers and as I have not published the new version yet, I can move the GtkBuilder file before creating the new release.)

Now to the problem:

The setup.py script originally set the GtkBuilder file (the settings.ui file to name it) to go into the data directory that is in the root directory of the package; it did so explicitely in the data_files section of the script. However, this led to the bug, where the strings of the settings file where not included in the POT template:
https://bugs.edge.launchpad.net/ubuntu/+source/onboard/+bug/452897

I solved the problem by removing the entry for the settings.ui file from the setup.py script and let it be automatically handled by dist-utils-extra. The solution worked fine when I created it, but it does not work anymore because the new 2.16 version of the dist-utils-extra package now moves the settings.ui file outside of the data directory; I think that this did not occur with the version 2.12 of the dist-utils-extra package.

I can of course solve the problem by editing the onboard code to look for the settings.ui file in its new location; but I am not sure whether it will not break again with further updates of the dist-utils-extra package. Consequently, I have the following questions:

- Am I right when I assume that the dist-utils-extra 2.16 package now puts the settings.ui file in the standard place for such files in the binary package, and that it will not break anymore with further updates of the dist-utils-extra package?

- Is there some documentation anywhere, that tells me what is the standard place of typical files in a binary package?

- Is it correct that the dist-utils-extra package only handles the files that are not explicitely named in the data_files section of the setup.py script?

- Does the dist-utils-extra package do a recursive search for files through all the folders of the source package or does it only handle the files located in specific directories? If the latter is true, could you please tell me where I can find some documentation about what folders it takes into account?

Many thanks in advance for any help,

Cheers,

Francesco.

Question information

Language:
English Edit question
Status:
Solved
For:
python-distutils-extra Edit question
Assignee:
No assignee Edit question
Solved by:
Francesco Fumanti
Solved:
2010-02-11
Last query:
2010-02-11
Last reply:
2010-02-11
Martin Pitt (pitti) said : #1

> - Am I right when I assume that the dist-utils-extra 2.16 package now puts the settings.ui file in the standard place for such files in the binary package, and that it will not break anymore with further updates of the dist-utils-extra package?

As far as I'm aware, if setup.py did not specify otherwise, p-d-e's "auto" module has always installed *.ui (from anywhere in the source tree) to /usr/share/<programname>/. That is the expected behaviour. If it's broken, please file a bug. If it's desired to be put somewhere else, you have to explicitly handle it in setup.py.

> - Is there some documentation anywhere, that tells me what is the standard place of typical files in a binary package?

It's in the header documentation of the auto.py module. See it with

  python -c 'import DistUtilsExtra.auto; help(DistUtilsExtra.auto)'

> - Is it correct that the dist-utils-extra package only handles the files that are not explicitely named in the data_files section of the setup.py script?

Not quite. It is correct that the DistUtilsExtra.auto module only handles files not explicitly covered in setup.py (anywhere, i. e. also in the "scripts=" section, etc.).

> - Does the dist-utils-extra package do a recursive search for files through all the folders of the source package or does it only handle the files located in specific directories? If the latter is true, could you please tell me where I can find some documentation about what folders it takes into account?

It does both, depending on the file type. Above documentation describes the expected location in the source tree, as well as the destination location on install.

Francesco Fumanti (frafu) said : #2

Thanks for your help.

Looking at the documentation that you indicated above, I remarked that the documentation does not say anything about the application icon. Does that mean that the icon of the application has to be explicitely handled by the setup.py script?

Martin Pitt (pitti) said : #3

Ah, icons don't need to be handled explicitly by the auto.py module, since they are already automatically handled by DistUtilsExtra's build_icons module. auto.py just includes that module.

I added a comment about that in trunk now:

http://bazaar.launchpad.net/~python-distutils-extra-hackers/python-distutils-extra/debian/revision/161

Francesco Fumanti (frafu) said : #4

Thanks for your help.