Skip to content

bug(pip): pip in Windows is now called via py #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bug(pip): pip in Windows is now called via py
Instead of the incorrect `python3`
  • Loading branch information
gnikit committed Feb 5, 2023
commit 1f9104e323cbbfb3d185f2d1dbeca2ee592f8134
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Changed the way Python is invoked in Windows machines uses `py` instead of `python`
- Changed the `npm vsce` package to `@vscode/vsce` for publishing
([#814](https://github.com/fortran-lang/vscode-fortran-support/issues/814))
- Changed logger to draw focus on certain error messages
Expand Down
5 changes: 4 additions & 1 deletion src/lib/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ export async function promptForMissingTool(
* @param pyPackage name of python package in PyPi
*/
export async function pipInstall(pyPackage: string): Promise<string> {
const py = 'python3'; // Fetches the top-most python in the Shell
// Fetches the top-most python in the Shell
// For Windows, use py instead of python3, see:
// https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-from-pypi
const py = process.platform === 'win32' ? 'py' : 'python3';
const args = ['-m', 'pip', 'install', '--user', '--upgrade', pyPackage];
return await shellTask(py, args, `pip: ${pyPackage}`);
}
Expand Down
4 changes: 3 additions & 1 deletion test/fortran/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
"fortran.fortls.excludeSuffixes": [".snap"],
"fortran.fortls.excludeDirectories": [".vscode/"],
"fortran.fortls.notifyInit": true,
"fortran.linter.compiler": "gfortran"
"fortran.linter.compiler": "gfortran",
// Supress Git pop-up interfering with UI testing
"git.openRepositoryInParentFolders": "always"
}
5 changes: 5 additions & 0 deletions test/fortran/fypp/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"fortran.linter.fypp.enabled": true,
// Supress Git pop-up interfering with UI testing
"git.openRepositoryInParentFolders": "always"
}
10 changes: 10 additions & 0 deletions test/fortran/lint/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"fortran.fortls.preprocessor.definitions": {
"REALTYPEWIDTH": "64",
"IDXTYPEWIDTH": "64"
},
"fortran.linter.extraArgs": ["-DIDXTYPEWIDTH=64", "-DREALTYPEWIDTH=64"],
"fortran.logging.level": "Debug",
// Supress Git pop-up interfering with UI testing
"git.openRepositoryInParentFolders": "always"
}