[Distutils] installation preferences proposal, volunteer to help implementation

Martijn Faassen faassen at startifact.com
Mon Nov 19 19:38:12 CET 2007


On Nov 19, 2007 7:18 PM, Phillip J. Eby <pje at telecommunity.com> wrote:
> >One thing that is not very pretty about 'or' syntax for version
> >preferences is the repetition of the package name:
> >
> >zope.interface | zope.interface == 1.2.3
> While syntactically valid, the above is meaningless, since the latter
> requirement implies the former.  The "|" is being used to mean
> "ordered choice" (I suppose "||" would be better in some respects).

Ah, I didn't realized you intended this to mean ordered choice. I was
thinking about a resolution algorithm that would go for the most
specific choice first for any package. I will have to think about

Since you say ordered choice, would you say it's this?

zope.interface == 1.2.3 | zope.interface?

Not meaningless, I hope?

> >I'd like a shortcut syntax for this, something like:
> >
> >zope.interface (1.2.3)
> >
> >We could let that be sugar that expands to the same underlying 'or' syntax.
> I'm wary of adding too much syntax to requirements.  The meaning of
> the parentheses in the above is entirely inscrutable.

I'd suggest the syntactic sugar helps making it clearer what's
intended: give me zope.interface, and 1.2.3 I'll guarantee you will
work. zope.interface == 1.2.3 | zope.interface is not intuitively
clear either in its intent. A special syntax can signal the special



More information about the Distutils-SIG mailing list