(venv: str, version: str)
| 68 | |
| 69 | |
| 70 | def get_env_patch(venv: str, version: str) -> PatchesT: |
| 71 | if version == 'system': |
| 72 | return ( |
| 73 | ('PATH', (os.path.join(venv, 'bin'), os.pathsep, Var('PATH'))), |
| 74 | ) |
| 75 | |
| 76 | return ( |
| 77 | ('GOROOT', os.path.join(venv, '.go')), |
| 78 | ('GOTOOLCHAIN', 'local'), |
| 79 | ( |
| 80 | 'PATH', ( |
| 81 | os.path.join(venv, 'bin'), os.pathsep, |
| 82 | os.path.join(venv, '.go', 'bin'), os.pathsep, Var('PATH'), |
| 83 | ), |
| 84 | ), |
| 85 | ) |
| 86 | |
| 87 | |
| 88 | @functools.lru_cache |