[Pythonmac-SIG] Exclude certain files from py2app built apps

Olivier Cornu o.cornu at gmail.com
Mon May 13 18:55:22 CEST 2013


Thanks for your quick reply. :-=


On Mon, May 13, 2013 at 11:10 AM, Ronald Oussoren <ronaldoussoren at mac.com>wrote:

>
> py2app does not use the MANIFEST file, that file is meant to be used with
> the sdist command.
>

Well, on my machine (Linux/Python-2.7), it seems bdist, bdist_rpm and
bdist_egg (among others) do generate an egg-info directory following
MANIFEST.in directives, just like sdist. Which appears to contradict your
point; Or did i miss something?


> > We've also tried defining data_files more restrictively so that only
> desired files figures in it. The whole data/ folder gets included
> nonetheless.
>

Sorry, i mixed things up: py2app does respect data_files. This problem
happened using distutils/setuptools, to build other package on other
platforms: defining data_files wasn't enough to get them included, they had
to appear in a MANIFEST(.in) as well.
As i'm looking for a unified way of specifying included files across
building methods i discarded this one, but it wasn't because of py2app.


>  > So far, the only solution we've found to this problem is to remove
> undesired files from the .app folder using a post-processing shell script
> (i.e. running after py2app). A rather inelegant hack.
>
> py2app currently doesn't have a way to filter which parts of a data folder
> gets included in the application bundle (that is, when you tell py2app to
> include 'data' you cannot tell it to exclude 'data/windows.dat').
>

Alright, no way to exclude files. I guess we'll just go "positive" and
specify only needed ones in data_files then -- even though it's going to be
more verbose a declaration. ;-)
It does work with py2app, although as mentioned above, it does not seem to
work with other tools. Is it just me day dreaming about a single mechanism
to include files among different setup.py commands, or is there one that i
just can't put my hand on?
Am i the only one surprised that i need to rely on different mechanisms to
tell setup.py what to include, just because the sub-command is different?
___
ɹǝıʌıןo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20130513/d7d3dee9/attachment.html>


More information about the Pythonmac-SIG mailing list