|
43 | 43 | from subprocess import check_output as subprocess_check_output |
44 | 44 |
|
45 | 45 | from virtualenv.create.creator import Creator |
46 | | -from virtualenv.create.describe import PosixSupports |
| 46 | +from virtualenv.create.describe import PosixSupports, WindowsSupports |
47 | 47 | from virtualenv.seed.embed.pip_invoke import PipInvoke |
48 | 48 | from virtualenv.seed.wheels import get_wheel |
49 | 49 | from virtualenv.seed.wheels.bundle import from_dir |
50 | 50 |
|
51 | 51 |
|
52 | | -class GraalPyCreatorPosix(Creator, PosixSupports): |
| 52 | +class AbstractGraalPyCreator(Creator): |
53 | 53 | """ |
54 | 54 | Describe and fake Creator service for GraalPy. |
55 | 55 |
|
@@ -115,13 +115,21 @@ def create(self): |
115 | 115 | "or environment variable VIRTUALENV_CREATOR=venv") |
116 | 116 |
|
117 | 117 |
|
| 118 | +class GraalPyCreatorPosix(AbstractGraalPyCreator, PosixSupports): |
| 119 | + pass |
| 120 | + |
| 121 | + |
| 122 | +class GraalPyCreatorWindows(AbstractGraalPyCreator, WindowsSupports): |
| 123 | + pass |
| 124 | + |
| 125 | + |
118 | 126 | @lru_cache() |
119 | 127 | def get_ensurepip_path(exe): |
120 | 128 | if exe.samefile(sys.executable): |
121 | 129 | import ensurepip |
122 | 130 | ensurepip_path = ensurepip.__path__[0] |
123 | 131 | else: |
124 | | - cmd = [exe, "-u", "-c", 'import ensurepip; print(ensurepip.__path__[0])'] |
| 132 | + cmd = [str(exe), "-u", "-c", 'import ensurepip; print(ensurepip.__path__[0])'] |
125 | 133 | ensurepip_path = subprocess_check_output(cmd, universal_newlines=True).strip() |
126 | 134 | return Path(ensurepip_path) / '_bundled' |
127 | 135 |
|
|
0 commit comments