On May 26, 2021, at 6:37 PM, eldrit...@gmail.com <eldrit...@gmail.com> wrote:
Perhaps I'm thinking of this the wrong way, but I want to bundle the Rez API within a framework so that the API can be more easily distributed (rather than having to install it on each machine's python, for example).
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/67a0de0b-f9e3-4365-8164-fb08c7cb4ae0n%40googlegroups.com.
def init_framework(self): self.log_debug("%s: Initializing..." % self) # This framework ships with additional Python packages # make these packages available to apps and engines using # this framework # Remap the platform name to our names pname = self.platform_name() # Virtual env has different structures on Windows if pname == "windows": bin_folder = "Scripts" else: bin_folder = "bin" # We just call the virtual env "activate_this.py" script, it # will tweak Python paths, but keep the "global" environement # reachable # Details can be found here : # http://virtualenv.readthedocs.org/en/latest/virtualenv.html#using-virtualenv-without-bin-python activate_this_path = os.path.join(os.path.dirname(__file__), "python", "vendors", pname, bin_folder, "activate_this.py") if not os.path.exists( activate_this_path): raise ValueError("Activate path %s for platform %s does not exist" % (activate_this_path, platform.system())) self.log_debug("Activating custom packages with %s" % activate_this_path) execfile(activate_this_path, dict(__file__=activate_this_path))
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/24e796e5-5cbf-4f72-9f2d-d7fcfecce28cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/0B225375-17B3-4254-B9A9-289C09BAA417%40gmail.com.