Question

I got inspired by an article in [http://www.xmldatabases.org/WK/blog/1094?t=item Inspirational Technology] and added some configuration-option to the software as an XML-File.

In times before I just did a copy \develeopment\somefile.ini \distribuiton\somefile.ini  after runing Py2Exe.

But after combining Py2Exe with Innosetup, it was really crucial to get these files copied to the Py2Exe dist-Directory during the Py2Exe Buildrun.

Solution

It was present all times in Py2Exe. But I did not really understand how to use it :)))

   1 setup(
   2     options = options,
   3     # The lib directory contains everything except the executables and the python dll.
   4     zipfile = zipfile,
   5     windows = [wxprog],
   6     # use out build_installer class as extended py2exe build command
   7     cmdclass = {"py2exe": build_installer},
   8     packages = ["encodings"],
   9     data_files=[("prog",["kategorien.xml",])]
  10     )

The crucial line is

   1     data_files=[("prog",["kategorien.xml",])
   2 ]

here you are supposed to supply a list of tuples