Open mottosso opened 5 years ago
PIL
library, which doesn't have a PyPI package. Pillow on the other hand is a fork that implements the library under the same Python package name.Possible command-line syntax for both optional and ANY-style requests.
rez env Qt.py (PySide2 PySide) pillow (numpy)
(numpy)
is optional(PySide2 PySide)
means one or the other, but not none
Goal
Support requirements that depend not not on only a range of different versions, but also a range of different packages.
Motivation
Useful for e.g. Qt.py which requires
[pyside, pyside2, pyqt4 or pyqt5]
, and for packages that depend on either[bleeding_rez, rez]
. It can't depend on all, and it can't depend on none.However, it dawned on me that this can also solve https://github.com/nerdvegas/rez/issues/21 which would be great, and could potentially squat two flies with one stone.
Implementation
From command-line.
From your
package.py
Where the first package found is picked.
As an added bonus, we'll also (finally) be able to account for https://github.com/nerdvegas/rez/issues/21 by adding a
null
package that does nothing.Now both
"packageA-1.2"
and""
are equally acceptable. IfpackageA-1.2
isn't found, it would behave as though it was optional and not break the solve.