Re: Exclude certain files from py2app built apps

Olivier Cornu <[email protected]>
Newsgroups gmane.comp.python.apple
Message-ID <CAFLV7-zMdEJC3RbTSY7dHevLgiV7c5jtFhJUXyN0f9PjLx=Wng@mail.gmail.com>
Thanks for your quick reply. :-=


On Mon, May 13, 2013 at 11:10 AM, Ronald Oussoren <[email protected]>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

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.