Python pip._internal.utils.temp_dir.AdjacentTempDirectory() Examples

The following are 20 code examples of pip._internal.utils.temp_dir.AdjacentTempDirectory(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pip._internal.utils.temp_dir , or try the search function .
Example #1
Source File: req_uninstall.py    From Mastering-Elasticsearch-7.0 with MIT License 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #2
Source File: req_uninstall.py    From Mastering-Elasticsearch-7.0 with MIT License 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #3
Source File: req_uninstall.py    From scylla with Apache License 2.0 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #4
Source File: req_uninstall.py    From V1EngineeringInc-Docs with Creative Commons Attribution Share Alike 4.0 International 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #5
Source File: req_uninstall.py    From Carnets with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #6
Source File: req_uninstall.py    From coffeegrindsize with MIT License 6 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #7
Source File: req_uninstall.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #8
Source File: req_uninstall.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #9
Source File: req_uninstall.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #10
Source File: req_uninstall.py    From fxxkpython with GNU General Public License v3.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #11
Source File: req_uninstall.py    From android_universal with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #12
Source File: req_uninstall.py    From CogAlg with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #13
Source File: req_uninstall.py    From rules_pip with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #14
Source File: req_uninstall.py    From Weapon-Detection-And-Classification with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #15
Source File: req_uninstall.py    From Hands-On-Application-Development-with-PyCharm with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #16
Source File: req_uninstall.py    From learn_python3_spider with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #17
Source File: req_uninstall.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #18
Source File: req_uninstall.py    From Building-Recommendation-Systems-with-Python with MIT License 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #19
Source File: req_uninstall.py    From deepWordBug with Apache License 2.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path 
Example #20
Source File: req_uninstall.py    From pex with Apache License 2.0 5 votes vote down vote up
def _get_directory_stash(self, path):
        # type: (str) -> str
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)  # type: TempDirectory
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path