ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> py2exe-users
py2exe-users
[Py2exe-users] compiling multiple executables
by David Figgins other posts by this author
Jul 28 2006 5:52PM messages near this date
[Py2exe-users] requires .NET | Re: [Py2exe-users] compiling multiple executables
I observed an issue while using py2exe on multiple targets:

setup.py:
	from distutils.core import setup
	import py2exe

	setup(console=["targetA.py"])
	setup(console=["targetB.py"])


If the set of imported modules in the scripts is different in targetA
then targetB:

targetA:
	import os,shutil,re,sys 

targetB:
	import os,re,stat


Using 'python setup.py py2exe -b1' 
  generates both executables, library.zip and the MSVCR71.dll, 
  but targetA will not execute because the library.zip file does
  not contain the required shutil module.

Flipping the order in the setup file:
  setup(console=["targetB.py"])	
  setup(console=["targetA.py"])

  Will make targetB not execute as it is missing the required
  stat module from the library.zip file, but targetA will now
  execute.

It appears the second process overwrites the contents of the library.zip
file.

The easy work-around is to make sure the sets of imported modules are 
the same for both script before translation to executables.

1) wanted to inform the list members of this observation.
2) It would be nice not to have to concern myself with this constraint,
   and will leave it as a request for enhancement. 
  
dave



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Py2exe-users mailing list
Py2exe-users@[...].net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Thread:
David Figgins
Mark Hammond
David Figgins
Bruno THOORENS

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved