[Pythonmac-SIG] [Pyobjc-dev] Py2app too complex?

Virgil Dupras hsoft at hardcoded.net
Sat Jul 31 10:56:47 CEST 2010


On Sat, Jul 31, 2010 at 10:26 AM, Ronald Oussoren
<ronaldoussoren at mac.com> wrote:
>
> On 31 Jul, 2010, at 3:09, Greg Ewing wrote:
>
>> Virgil Dupras wrote:
>>> Is it possible that py2app is a little too complex for what
>>> it does?
>>
>> I think a lot of the complexity of py2app and py2exe come
>> from trying to automatically figure out what modules and
>> libraries need to be included.
>
> I object to calling py2app complex, the code base is fairly easy to understand.   Have you even looked at the code base?
>
>>
>> I've been thinking for a while about creating something
>> simpler that doesn't attempt any automatic module discovery
>> at all. You would be required to construct a project file
>> that explicitly lists all the required modules and libraries,
>> including standard library modules.
>
> That is not simpler, it just shifts the complexity to the user. It is better to shift the complexity away from the user, that way the user does not have to reinvent the weel.
>
> Ronald
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Pyobjc-dev mailing list
> Pyobjc-dev at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
>

I'm not sure I agree that no dependency finding would be a good thing.
Importing a stdlib modules often imports tons of other ones you don't
know about and manually figuring these dependencies out can be really
tedious. However, I think that using modulegraph instead of the
built-in modulefinder is a mistake. For one thing, modulegraph doesn't
support relative imports, yet. Yeah, we could work on it, but why
bother when modulefinder already does it? It's just more maintenance.
I know modulegraph is supposed to be better, but I would *gladly* list
my non-stdlib dependencies manually rather than pray that py2app finds
them correctly. The way I work with py2app now is that whenever a
dependency isn't found by py2app, I put an explicit import of it in my
"main py file" in a section documented for being py2app workaround
imports. It works, but I'm sure there's a more elegant way...

I think distutils is supposed to let you list dependencies manually in
the setup() call, but when I tried it I found it extremely
non-working, at all. So yes, a reliable way to manually list
dependencies would be a great thing.

Virgil Dupras


More information about the Pythonmac-SIG mailing list