Getting py2exe to work with zope.interface?

I've had this same problem with zope. Interface and friends (zope. Component, et al).

Specifically it is a problem with how py2exe searches and discovers packages AND how the zope packages are installed zope is a namespace package and as a result relies on some funky import logic in it's pth files (see zope. Interface-3. *.

*-py2. *-nspkg. Pth ) in order to add it's sub-packages to python's path.

Have a look at it in site-packages and you'll see what I mean py2exe has problems "discovering" this kind of package In the end what I did was manually repackage the various zope packages I was using into a stardard module setup in site-packages and then reran py2exe which then discovered everything no problem. It's a PITA, but until py2exe is able to handle packaging edge cases and/or the zope packages are packaged in a py2exe friendly fashion, it's about the best you can do.

I've had this same problem with zope. Interface and friends (zope. Component, et al).

Specifically it is a problem with how py2exe searches and discovers packages AND how the zope packages are installed. Zope is a namespace package and as a result relies on some funky import logic in it's . Pth files (see zope.

Interface-3. *. *-py2.

*-nspkg. Pth) in order to add it's sub-packages to python's path. Have a look at it in site-packages and you'll see what I mean.

Py2exe has problems "discovering" this kind of package. In the end what I did was manually repackage the various zope packages I was using into a stardard module setup in site-packages and then reran py2exe - which then discovered everything no problem. It's a PITA, but until py2exe is able to handle packaging edge cases and/or the zope packages are packaged in a py2exe friendly fashion, it's about the best you can do.

I went to check that I could do this without running afoul of their license. Is it just me, or is the Zope Public License not actually included with any of their distributions? – detly Oct 19 at 6:59 There is a reference to the license include at the top of the actual code files - which is all they need.

You are not doing anything contrary to the license (i.e. You are not actually changing the code in any way), you're just altering how the package is installed on your system. It's not any different than what py2exe already does with all your python libraries it packs into an exe.

– Mark Gemmill Oct 19 at 7:14 Bah, here it is. – detly Oct 19 at 7:16 my impression is that it'd still be creating a derived work, but it looks like the license is fairly liberal about that anyway, so no matter. – detly Oct 19 at 7:20 Okay, I'm marking this as the answer, since it got me past this phase, but now py2exe is choking on pretty much every other package I use so I'm abandoning it.So for anyone else reading this, I have no way to verify whether it worked in the final built executable :/ – detly Oct 197 at 1:56.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions