Ejemplo n.º 1
0
    def uninstall_conda_local(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling the Conda python distribution locally ...")

        # Check installation
        installation_path = fs.join(fs.home(), "miniconda")
        if not fs.is_directory(installation_path):
            log.warning("Conda was not found locally")
            return

        # Debugging
        log.debug("Removing the Conda directory ...")

        # Remove the directory
        fs.remove_directory(installation_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For Conda, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)
        terminal.remove_from_path_variable_containing("miniconda/bin")
Ejemplo n.º 2
0
    def uninstall_conda_remote(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info(
            "Uninstalling the Conda python distribution on the remote host ..."
        )

        # Determine path of miniconda installation
        installation_path = fs.join(self.remote.home_directory, "miniconda")
        if not self.remote.is_directory(installation_path):
            log.warning("Conda was not found on the remote host")
            return

        # Debugging
        log.debug("Removing the Conda directory ...")

        # Remove the directory
        self.remote.remove_directory(installation_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For Conda, added by PTS (Python Toolkit for SKIRT)"
        self.remote.remove_aliases_and_variables_with_comment(comment)
        self.remote.remove_from_path_variable_containing("miniconda/bin")
Ejemplo n.º 3
0
    def uninstall_pts_local(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling PTS locally ...")

        # Check installation
        pts_root_path = introspection.pts_root_dir
        if not fs.is_directory(pts_root_path):
            log.warning(
                "PTS could not be found locally (which is certainly weird) ..."
            )
            return

        # Debugging
        log.debug("Removing the PTS directory ...")

        # Remove the entire directory
        fs.remove_directory(pts_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For PTS, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 4
0
    def uninstall_pts_remote(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling PTS on the remote host ...")

        # Check installation
        pts_root_path = self.remote.pts_root_path
        if not self.remote.is_directory(pts_root_path):
            log.warning("PTS is not present on the remote host")
            return

        # Debugging
        log.debug("Removing the PTS directory ...")

        # Remove the entire directory
        self.remote.remove_directory(pts_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For PTS, added by PTS (Python Toolkit for SKIRT)"
        self.remote.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 5
0
    def uninstall_skirt_local(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling SKIRT locally ...")

        # Check installation
        skirt_root_path = introspection.skirt_root_dir
        if not fs.is_directory(skirt_root_path):
            log.warning("SKIRT was not found locally")
            return

        # Debugging
        log.debug("Removing the SKIRT directory ...")

        # Remove the entire directory
        fs.remove_directory(skirt_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For SKIRT and FitSKIRT, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 6
0
    def uninstall_skirt_remote(self):
        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling SKIRT on the remote host ...")

        # Check installation
        skirt_root_path = self.remote.skirt_root_path
        if not self.remote.is_directory(skirt_root_path):
            log.warning("SKIRT was not found on the remote host")
            return

        # Debugging
        log.debug("Removing the SKIRT directory ...")

        # Remove the entire directory
        self.remote.remove_directory(skirt_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For SKIRT and FitSKIRT, added by PTS (Python Toolkit for SKIRT)"
        self.remote.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 7
0
    def uninstall_conda_remote(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling the Conda python distribution on the remote host ...")

        # Determine path of miniconda installation
        installation_path = fs.join(self.remote.home_directory, "miniconda")
        if not self.remote.is_directory(installation_path):
            log.warning("Conda was not found on the remote host")
            return

        # Debugging
        log.debug("Removing the Conda directory ...")

        # Remove the directory
        self.remote.remove_directory(installation_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For Conda, added by PTS (Python Toolkit for SKIRT)"
        self.remote.remove_aliases_and_variables_with_comment(comment)
        self.remote.remove_from_path_variable_containing("miniconda/bin")
Ejemplo n.º 8
0
    def uninstall_conda_local(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling the Conda python distribution locally ...")

        # Check installation
        installation_path = fs.join(fs.home, "miniconda")
        if not fs.is_directory(installation_path):
            log.warning("Conda was not found locally")
            return

        # Debugging
        log.debug("Removing the Conda directory ...")

        # Remove the directory
        fs.remove_directory(installation_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For Conda, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)
        terminal.remove_from_path_variable_containing("miniconda/bin")
Ejemplo n.º 9
0
    def uninstall_pts_remote(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling PTS on the remote host ...")

        # Check installation
        pts_root_path = self.remote.pts_root_path
        if not self.remote.is_directory(pts_root_path):
            log.warning("PTS is not present on the remote host")
            return

        # Debugging
        log.debug("Removing the PTS directory ...")

        # Remove the entire directory
        self.remote.remove_directory(pts_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For PTS, added by PTS (Python Toolkit for SKIRT)"
        self.remote.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 10
0
    def uninstall_pts_local(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling PTS locally ...")

        # Check installation
        pts_root_path = introspection.pts_root_dir
        if not fs.is_directory(pts_root_path):
            log.warning("PTS could not be found locally (which is certainly weird) ...")
            return

        # Debugging
        log.debug("Removing the PTS directory ...")

        # Remove the entire directory
        fs.remove_directory(pts_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For PTS, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)
Ejemplo n.º 11
0
    def uninstall_skirt_local(self):

        """
        This function ...
        :return:
        """

        # Inform the user
        log.info("Uninstalling SKIRT locally ...")

        # Check installation
        skirt_root_path = introspection.skirt_root_dir
        if not fs.is_directory(skirt_root_path):
            log.warning("SKIRT was not found locally")
            return

        # Debugging
        log.debug("Removing the SKIRT directory ...")

        # Remove the entire directory
        fs.remove_directory(skirt_root_path)

        # Debugging
        log.debug("Removing lines from shell configuration ...")

        # Remove lines from shell configuration file
        comment = "For SKIRT, added by PTS (Python Toolkit for SKIRT)"
        terminal.remove_aliases_and_variables_with_comment(comment)