Skip to content

Commit 2831efe

Browse files
nikita-bykovNikita Bykovdmitry-shibanov
authored
Improve find-python to add "Scripts" folder to PATH on Windows machines (#169)
* added 'Scripts' folder to PATH on Windows * add release code * update index.js * rebuild index.js * remove duplicate block Co-authored-by: Nikita Bykov <[email protected]> Co-authored-by: Dmitry Shibanov <[email protected]>
1 parent 3b3f2de commit 2831efe

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dist/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -6738,6 +6738,10 @@ function usePyPy(majorVersion, architecture) {
67386738
core.exportVariable('pythonLocation', pythonLocation);
67396739
core.addPath(installDir);
67406740
core.addPath(_binDir);
6741+
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
6742+
if (IS_WINDOWS) {
6743+
core.addPath(path.join(installDir, 'Scripts'));
6744+
}
67416745
const impl = 'pypy' + majorVersion.toString();
67426746
core.setOutput('python-version', impl);
67436747
return { impl: impl, version: versionFromPath(installDir) };

src/find-python.ts

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ function usePyPy(
6666

6767
core.addPath(installDir);
6868
core.addPath(_binDir);
69+
// Starting from PyPy 7.3.1, the folder that is used for pip and anything that pip installs should be "Scripts" on Windows.
70+
if (IS_WINDOWS) {
71+
core.addPath(path.join(installDir, 'Scripts'));
72+
}
6973

7074
const impl = 'pypy' + majorVersion.toString();
7175
core.setOutput('python-version', impl);

0 commit comments

Comments
 (0)