コード例 #1
0
    def lib_dir(self):
        """Return the path to Python's lib directory

        This is the directory where the core Python modules (os, sys, logging,
        etc..) reside .. along with the site-packages/ directory.
        """
        if WIN:
            return existing(xjoin(self.root_dir, 'Lib'))
        else:
            return existing(
                xjoin(self.root_dir, 'lib', 'python{0}'.format(self.pyver)))
コード例 #2
0
    def python_exe(self):
        # Note: we cannot use `self.scripts_dir` here.
        if WIN:
            # virtualenv creates the python exe inside Scripts/ directory
            python_exe = xjoin(self.root_dir, 'Scripts', 'Python.exe')
            if not os.path.exists(python_exe):
                # but normal Python installation has it on root directory
                python_exe = xjoin(self.root_dir, 'Python.exe')
        else:
            python_exe = xjoin(self.root_dir, 'bin', 'python')

        return existing(python_exe)
コード例 #3
0
 def scripts_dir(self):
     return existing(xjoin(self.user_base_dir, 'Scripts' if WIN else 'bin'))
コード例 #4
0
 def lib_dir(self):
     return existing(xjoin(self.site_packages_dir, os.pardir))
コード例 #5
0
 def scripts_dir(self):
     """Return the path to directory where scripts will be installed"""
     return existing(xjoin(self.root_dir, 'Scripts' if WIN else 'bin'))
コード例 #6
0
 def site_packages_dir(self):
     return existing(xjoin(self.lib_dir, 'site-packages'))