def _prepare_catalog(catalog): if catalog == None: catalog = os.path.join(elocation.eweasel(), "control", "catalog") catalog = os.path.expandvars(catalog) if not os.path.exists(catalog): catalog = os.path.join(elocation.build(), catalog + ".eweasel_catalog") return os.path.realpath(catalog)
def test_location(): elocation.move ("eve", "eve2") elocation.copy ("eve2", "eve3") elocation.delete ("eve3") elocation.move ("eve2", "eve") print (elocation.base_directory()) print (elocation.trunk_source()) print (elocation.eve_source()) print (elocation.eweasel()) print (elocation.nightly()) print (elocation.build()) print (elocation.eweasel_build())
def update_environment_variables(): # ISE_PLATFORM if not "ISE_PLATFORM" in os.environ or os.getenv("ISE_PLATFORM") != d_ise_platform: set_persistent_environment_variable("ISE_PLATFORM", d_ise_platform) # ISE_EIFFEL version, path = get_installed_version() if "ISE_EIFFEL" in os.environ and path == None: SystemLogger.debug ("WARNING: No nightly build available. Using ISE_EIFFEL = " + os.getenv("ISE_EIFFEL")) elif not "ISE_EIFFEL" in os.environ or os.getenv("ISE_EIFFEL") != path: set_persistent_environment_variable("ISE_EIFFEL", path) # else: # raise Exception ("Could not set ISE_EIFFEL environment variable.") # ISE_C_COMPILER if not "ISE_C_COMPILER" in os.environ or os.getenv("ISE_C_COMPILER") != d_ise_c_compiler: set_persistent_environment_variable("ISE_C_COMPILER", d_ise_c_compiler) # EIFFEL_SRC eiffel_source = os.path.realpath(elocation.trunk_source()) if not "EIFFEL_SRC" in os.environ or os.getenv("EIFFEL_SRC") != eiffel_source: set_persistent_environment_variable("EIFFEL_SRC", eiffel_source) # EWEASEL if not "EWEASEL" in os.environ or os.getenv("EWEASEL") != elocation.eweasel(): set_persistent_environment_variable("EWEASEL", elocation.eweasel()) # ISE_LIBRARY eiffel_source = os.path.realpath(elocation.trunk_source()) if not "ISE_LIBRARY" in os.environ or os.getenv("ISE_LIBRARY") != eiffel_source: set_persistent_environment_variable("ISE_LIBRARY", eiffel_source) # PATH: EiffelStudio # TODO: update PATH contents # Temporary path update for execution in same session os.environ['PATH'] = os.path.join(os.getenv("ISE_EIFFEL"), 'studio', 'spec', os.getenv("ISE_PLATFORM"), 'bin') + os.pathsep + os.environ['PATH'] if platform.system() != "Windows": with open (os.path.join (elocation.base_directory(), 'scripts', 'nightly.unix.sh'), 'w') as l_file: l_file.write ('export ISE_EIFFEL=') l_file.write (path) l_file.write ('\n') return
def update(): esvn.update_repository(d_eweasel_svn, elocation.eweasel())