Commit ec580dc
committed
scripts_dir_from_site_packages: distinguish Windows venv vs user-site layout
Windows has two distinct site-packages layouts that the function
previously conflated:
* venv / system: <prefix>/Lib/site-packages (2 parents to prefix)
* user-site: <root>/Python<ver>/site-packages (1 parent to
the versioned Python dir whose Scripts we want)
Both were being handled as site_packages.parent.parent, which for
user-site returns ...\Roaming\Python instead of
...\Roaming\Python\Python312 — so
PipProvider.setup_PATH's discovery of Windows user-installed pip
scripts fell back to sysconfig.get_path('scripts') alone.
Dispatch on the immediate parent's name (.lower() == 'lib' for
venv/system, everything else for user-site). Flagged by
devin-ai-integration on PR #31.1 parent 79eac71 commit ec580dc
1 file changed
+21
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
389 | 398 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
0 commit comments