Ejemplo n.º 1
0
 def write_env_file(self):
     """ Write the environment file."""
     env = envfilebuilder.EnvFileBuilder("# Ratzdab environment.\n")
     env.add_environment("RATROOT", self._dependency_paths[self._rat_dep])
     env.add_environment("ROOTSYS", self._dependency_paths[self._root_dep])
     env.append_library_path(
         "$ROOTSYS/lib:%s" %
         os.path.join(self.get_install_path(), "ratzdab/lib"))
     env.append_path("$ROOTSYS/bin:%s" %
                     os.path.join(self.get_install_path(), "ratzdab/bin"))
     env.write(self._system.get_install_path(), "env_%s" % self._name)
Ejemplo n.º 2
0
    def write_env_file(self):
        """ Adds general parts and then writes the env file."""
        self._env_file = envfilebuilder.EnvFileBuilder(
            "#snogoggles environment\n")
        self._env_file.add_source(self._dependency_paths[self._geant_dep],
                                  "bin/geant4")
        self._env_file.add_source(self._dependency_paths[self._rat_dep], "env")

        self._env_file.add_environment("VIEWERROOT", self.get_install_path())
        self._env_file.add_environment("ROOTSYS",
                                       self._dependency_paths[self._root_dep])
        self._env_file.add_environment("RATTOOLS",
                                       self._dependency_paths["rattools-dev"])
        self._env_file.add_environment("SFMLROOT",
                                       self._dependency_paths[self._sfml_dep])
        self._env_file.add_environment(
            "GLEWROOT",
            os.path.join(self._dependency_paths[self._sfml_dep], "extlibs"))
        if self._dependency_paths[
                self._xercesc_dep] is not None:  # Conditional Package
            self._env_file.add_environment(
                "XERCESCROOT", self._dependency_paths[self._xercesc_dep])
        if self._dependency_paths[self._bzip_dep] is not None:
            self._env_file.add_environment(
                "BZIPROOT", self._dependency_paths[self._bzip_dep])

        if self._dependency_paths[self._curl_dep] is not None:
            self._env_file.append_path(
                os.path.join(self._dependency_paths[self._curl_dep], "bin"))
            self._env_file.append_library_path(
                os.path.join(self._dependency_paths[self._curl_dep], "lib"))
        self._env_file.append_path(os.path.join(self.get_install_path(),
                                                "bin"))
        self._env_file.append_path(
            os.path.join(self._dependency_paths[self._root_dep], "bin"))
        self._env_file.append_path(
            os.path.join(self._dependency_paths[self._clhep_dep], "bin"))
        self._env_file.append_path(
            os.path.join(self._dependency_paths[self._scons_dep], "script"))

        self._env_file.append_python_path(
            os.path.join(self.get_install_path(), "python"))

        # Library path is always after the environment exports/setenvs
        self._env_file.append_library_path(
            os.path.join(self._dependency_paths[self._clhep_dep], "lib"))
        self._env_file.append_library_path(
            "$ROOTSYS/lib:$RATTOOLS/ratzdab/lib:$SFMLROOT/lib:$XERCESCROOT/lib:$GLEWROOT/lib"
        )
        self._env_file.write(self._system.get_install_path(),
                             "env_%s" % self._name)
Ejemplo n.º 3
0
 def write_env_file(self):
     """ Adds general parts and then writes the env file."""
     self._env_file = envfilebuilder.EnvFileBuilder("#xsnoed environment\n")
     self._env_file.add_source(
         os.path.join(self._dependency_paths[self._root_dep], "bin"),
         "thisroot")
     self._env_file.add_source(
         os.path.join(self._dependency_paths[self._geant_dep], "bin"),
         "geant4")
     self._env_file.add_source(self._dependency_paths[self._rat_dep], "env")
     self._env_file.add_source(
         os.path.join(self._dependency_paths[self._rattools_dep],
                      "ratzdab"), "env")
     self._env_file.write(self._system.get_install_path(),
                          "env_%s" % self._name)
Ejemplo n.º 4
0
Archivo: rat.py Proyecto: kgilje/snoing
 def write_env_file(self):
     """Adds general parts and then writes the env file."""
     self._env_file = envfilebuilder.EnvFileBuilder('#rat environment\n')
     if isinstance(self._root_dep, types.ListType):
         root_dep_path = self._dependency_paths[self._root_dep[0]]
     else:
         root_dep_path = self._dependency_paths[self._root_dep]
     self._env_file.add_environment('ROOTSYS', root_dep_path)
     self._env_file.add_environment('RAT_SCONS', self._dependency_paths[self._scons_dep])
     self._env_file.append_path(os.path.join(root_dep_path, 'bin'))
     self._env_file.append_python_path(os.path.join(root_dep_path, 'lib'))
     self._env_file.append_library_path(os.path.join(root_dep_path, 'lib'))
     self._env_file.add_post_source(self.get_install_path(), 'env')
     self._write_env_file()
     self._env_file.write(self._system.get_install_path(), 'env_%s' % self._name)
Ejemplo n.º 5
0
 def write_env_file(self):
     """ Adds general parts and then writes the env file."""
     self._env_file = envfilebuilder.EnvFileBuilder("#rat environment\n")
     self._env_file.add_environment("ROOTSYS",
                                    self._dependency_paths[self._root_dep])
     self._env_file.add_environment("RAT_SCONS",
                                    self._dependency_paths[self._scons_dep])
     self._env_file.append_path(
         os.path.join(self._dependency_paths[self._root_dep], "bin"))
     self._env_file.append_python_path(
         os.path.join(self._dependency_paths[self._root_dep], "lib"))
     self._env_file.append_library_path(
         os.path.join(self._dependency_paths[self._root_dep], "lib"))
     self._env_file.add_post_source(self.get_install_path(), "env")
     self._write_env_file()
     self._env_file.write(self._system.get_install_path(),
                          "env_%s" % self._name)