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 AcademySoftwareFoundation#21 which would be great, and could potentially squat two flies with one stone.
Implementation
From command-line.
rez env six python [pyqt4 pyqt5]
From your package.py
requires = [
"pyyaml-2.4",
"six-1.1",
["PySide-1.2, "PyQt4-4.7", "PyQt5", "PySide2"],
]
Where the first package found is picked.
As an added bonus, we'll also (finally) be able to account for AcademySoftwareFoundation#21 by adding a null package that does nothing.
requires = [
["", "packageA-1.2"]
]
Now both "packageA-1.2" and "" are equally acceptable. If packageA-1.2 isn't found, it would behave as though it was optional and not break the solve.
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 AcademySoftwareFoundation#21 which would be great, and could potentially squat two flies with one stone.
Implementation
From command-line.
From your
package.pyWhere the first package found is picked.
As an added bonus, we'll also (finally) be able to account for AcademySoftwareFoundation#21 by adding a
nullpackage that does nothing.Now both
"packageA-1.2"and""are equally acceptable. IfpackageA-1.2isn't found, it would behave as though it was optional and not break the solve.