Closed mottosso closed 5 years ago
Got a first draft of this.
python/3.7/os-windows
when there's a python/3.7/os-linux
there already.rez cp
. Will need this for resolved localisation (see below)Basic operation
Protect against duplicates
Next step is resolving a given request, to copy more than just the specific request. Then this MVP is done and ready to move towards a 1.0.
All done.
Notice how the version of maya
changes, based on what other requirements there are.
Also notice that, as a side-effect of resolving the request, you can also pass multiple requests that resolve together (and are thus compatible) and are each localised. Here's you'll also see the existing-package detection in action, given I already had the alita
package localised.
Finally the full CLI interface as of this writing.
$ rez env localz -- localise --help
usage: localz [-h] [--version] [--requires PKG [PKG ...]] [--all-variants]
[--paths PATH [PATH ...]] [-f] [-v]
[PKG [PKG ...]]
Localise packages from one location to another, to improve
performance or facilitate remote collaboration on software
or content.
positional arguments:
PKG Packages to localize
optional arguments:
-h, --help show this help message and exit
--version Print version and exit
--requires PKG [PKG ...]
Localise request, fulfilling these requirements
--all-variants Copy not just the resolved variant, but all of them
--paths PATH [PATH ...]
Package search path (ignores --no-local if set)
-f, --force Copy package even if it isn't relocatable (use at your
own risk)
-v, --verbose
examples:
Latest available version of Maya
$ rez env localz -- localise maya
Version of Maya, required by Alita
$ rez env localz -- localise maya --requires alita
Series of requests, all compatible with each other
$ rez env localz -- localise six-1 maya-2018 python-3.7
With a fully resolved context, there's a line in there to exclude anything that wasn't in the original request. Next I'd like an option to skip that, and localise all packages part of a request. In the case of maya alita
, I'm expecting 10+ packages to be resolved given alita
has a number of additional requirements, and that some requirements are weakly dependent on exactly maya
.
Goal
Test the concept, as specified in #1
Implementation
The above command should make
python-2.7.16
available locally under these conditions.arch-AMD64
platform-windows
os-windows-10.0
alita.requires = ["python-2.7"]
python-3.7.3
is availablepython-2.7.14
is available