![](https://secure.gravatar.com/avatar/01aa7d6d4db83982a2f6dd363d0ee0f3.jpg?s=120&d=mm&r=g)
On Feb 17, 2015, at 08:58 PM, Paul Moore wrote:
But I would say that anything that is added to zipimport should be cross-platform. Having support for C extensions in zipimport on Unix only will just add another way in which Python applications can inadvertantly be non-portable... (It should be possible to support both Windows and Unix, though, as py2exe has the Windows side of things covered so presumably the code used in py2exe could be ported to zipimport).
The actual "import an extension module" support in zipimport does need to be cross-platform, but it can work differently depending on the platform. For example, if extended-dlopen is available on your Linux machine, zipimport could just use that. For a traditional-dlopen-only machine, it would copy-to-filesystem. It would do whatever Windowsy thing makes sense over there too. I'm much less concerned about the cross-platform portability of the resulting pyz files. There's lots of reasons why an application built in (or for) my Linux machine might not work properly on your Windows machine, but FWIW if it were the only problem, doing a native rebuild on the target platform (or via supported cross-building) would be fine with me. Cheers, -Barry