← Back to team overview

bzr-windows team mailing list archive

Re: Windows Installers now a separate project (call for helpers)

 

Vincent Ladeuil пишет:
>>>>>> "bialix" == Alexander Belchenko <bialix@xxxxxxx> writes:
> 
> <snip/>
> 
>     >> 
>     >> Last time I went into setup.py I got lost :-/
>     >> 
>     >> On the other hand (from memory) I think that reading that I came
>     >> across a comment somewhere that setup allows to define more
>     >> commands, this definitely apply here I think even if it's done in
>     >> the windows installer project.
> 
>     bialix> This is not our case.
> 
> Can you elaborate ?

If you look into QBzr's setup.py then you can see that we extend it with a bunch of custom commands.
These commands defined in extras/ package. So when you said "setup allows to define more commands"
this is exactly what we do in QBzr.

But for windows installer there is used the separate command "py2exe" which provided by py2exe library.

If you need to extend ability of setup.py to correctly gather dependencies for such complex build as
 official standalone bzr.exe then you probably need to go another route. You'd want to get
information from plugins and other libs about their modules list, data and dependencies, as John
pointed.

> I'm under the impression that the scripts used today are a bit
> ad-hoc, and I suspect some duplication for handling several
> plugins. 

I'm not quite understand what you mean when you wrote "the scripts used today". But there is
definitely some duplication.

> Adding support to include plugins is what I'm talking about.
> 
> That could include plugins declaring dependencies (even python
> dependencies if needed as was the case recently for a plugin that
> needed a standard library which py2exe didn't detect (I don't
> remember clearly)).

In this case you should declare API that every plugin's setup.py should follow. You can start from
here: every setup.py should be importable, e.g. call to main setup() function should be guarded with

if __name__ == '__main__':
	setup(...)

Then you need to define the set of functions every setup.py should provide to get modules list, data
list, dependencies list etc. So when main setup.py will import setup.py from plugin it can easily
access plugin-specific info. Without these 2 steps there is no way forward.



Follow ups

References