I've checked in the changes suggested by Bob Ippolito. The new setup.py
file looks like...
from distutils.core import setup
import sys
if sys.platform == 'darwin':
import py2app
buildstyle = 'app'
else:
import py2exe
buildstyle = 'console'
setup( name = "minimal",
data_files = [ (".", ["readme.txt", "minimal.rsrc.py"]) ],
**{buildstyle: ["minimal.py"]}
)
ka
Begin forwarded message:
> From: "Bob Ippolito" <bo...@re...>
> Date: March 23, 2005 4:04:42 PM PST
> To: al...@se...
> Subject: PythonCard and py2app
>
> Using svn head of py2app (r436 or later), the following diff will
> allow minimalStandalone's setup.py to build for both py2exe and
> py2app.
>
> -bob
>
>
> ===================================================================
> RCS file:
> /cvsroot/pythoncard/PythonCard/samples/minimalStandalone/setup.py,v
> retrieving revision 1.2
> diff -u -r1.2 setup.py
> --- setup.py 26 Mar 2004 16:37:37 -0000 1.2
> +++ setup.py 24 Mar 2005 00:01:09 -0000
> @@ -12,10 +12,16 @@
> """
>
> from distutils.core import setup
> -import py2exe
> +import sys
> +if sys.platform == 'darwin':
> + import py2app
> + buildstyle = 'app'
> +else:
> + import py2exe
> + buildstyle = 'console'
>
> setup( name = "minimal",
> - console = ["minimal.py"],
> - data_files = [ (".", ["readme.txt", "minimal.rsrc.py"]) ]
> + data_files = [ (".", ["readme.txt", "minimal.rsrc.py"]) ],
> + **{buildstyle: ["minimal.py"]}
> )
>
>
|