コード例 #1
0
ファイル: venv.py プロジェクト: gerva/staging-release
    def _executable(self):
        """returns the virtualenv excutable"""
        if self.executable:
            return self.executable

        for binary in self.binaries:
            venv_exec = which(binary)
            if venv_exec:
                self.executable = venv_exec
                log.debug('virtualenv executable: {0}'.format(self.executable))
                return self.executable
        return self.executable
コード例 #2
0
ファイル: config.py プロジェクト: gerva/staging-release
 def _set_python_path(self):
     """adds the full path to your python executable in common:python_path"""
     self.set('common', 'python_path', which('python'))
コード例 #3
0
ファイル: test_which.py プロジェクト: gerva/staging-release
def test_does_not_exist():
    assert which('not_existing') is None
コード例 #4
0
ファイル: test_which.py プロジェクト: gerva/staging-release
def test_exists():
    assert which('python') is not None