After much more testing, I'm fairly certain this is a Pyinstaller issue. I've done everything I know to do, including adding the win32com gen_py tree to the spec file (builds with the gen_py in the build directory ok, but still doesn't get used). I even tried reworking how we are using the win32com client dispatch (static vs. dynamic). None of it changes the behavior: when the 2.1 built service starts, it immediately begins creating temp folders with gen_py in them. The temp folders are named randomly, always starting with "tmp" inside the Windows\temp directory. They keep getting created as long as the service runs, as often as com is invoked (apparently). The same code, built on 1.5, does not have this problem. 1.5 includes a "support" folder in the directory with gen_py inside it.
Thoughts? Confirmations? Arguments? Thanks. On Friday, February 7, 2014 11:51:37 AM UTC-7, Ryan Hansen wrote: > > I've been trying to find the right solution to this particular problem for > a month or so now with no luck. I'm not even sure this is a Pyinstaller > issue or a maybe an improper use of win32com; what I do know is that this > problem does not happen with pre 2.x versions of Pyinstaller. > > Here's the problem: > > We have a threaded Python application that, in some cases, has to > communicate with another piece of our software through COM. Since moving > our build to Pyinstaller 2.1, we have found that the win32com gen_py cache > is created in Windows\Temp\<random_tmp_folder_name> rather than in the > build folder under "support" (as it used to be in Pyinstaller 1.5). The > problem with this is that while the app is running (as a Windows service), > it doesn't re-use that cache, it creates a new one every time it needs it, > so Windows\Temp ends up with hundreds, and over relatively short time even > thousands, of <ramdom_tmp_folder_name>, each with a gen_py and all of its > related files. > > I'm wondering if there's something new in Pyinstaller 2.1 that either > causes this problem, or if there's something we can do in the spec file to > tell the exe where to find gen_py. Mostly I'm just trying to narrow down > if this is a Pyinstaller problem at all. As I said, it only happens when > we build with Pyinstaller 2.1. If we build the same code base with 1.5 it > doesn't happen (but that has other issues that makes 1.5 a no-go for us.) > > Thanks in advance for any insight you can provide. > > -Ryan > -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/groups/opt_out.
