[Buildroot] [PATCH 2/3] graph-depends: split off get_version/get_depends into pkgutil.py

Yann E. MORIN yann.morin.1998 at free.fr
Sun Nov 11 19:00:58 UTC 2018


Arnout, All,

On 2018-11-08 09:01 +0100, Arnout Vandecappelle spake thusly:
> On 07/11/18 23:45, Yann E. MORIN wrote:
> >> def get_dependency_tree(backward: bool = True) -> Dict[str, Package]:
> > Just for my own understanding: what syntax is that? I was trying to write
> > the protoype of the function, but in Python there is no prototype where
> > you can explain the return type. Yours seems like it is what I was
> > looking for. Is it described somewhere?
>  For documentation, I'll refer to PEP 484 [1].

ACK, thanks. :-)

[--SNIP--]
> > But let me bikeshed in turn: I would make your proposed
> > 'host' field an enum instead,
> 
>  Python enums require an external package that we can't assume is installed. But
> I suppose you didn't mean an actual enum :-P

Yeah, I knew, I was thinking 'emulated' enum, as class-level constants, like:

    class Package():
        T_UNKNOWN_PKG = 0
        T_HOST_PKG = 1
        T_TARGET_PK = 2
        [...]

and then refer to them as Package.T_HOST_PKG etc...

(but of course, they are not constant! they are just class-variables
with default values.)

> > Dang, I'm always getting side-tracked into side topics. All I wanted was
> > a faster graph-depends, and it's already there now! Sob... ;-)
>  Feel free to ignore my feedback! I'll take progress over perfection any time.

Eh! ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list