Skip to content
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

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

Closed
wants to merge 4 commits into from

Conversation

gnikit
Copy link
Member

@gnikit gnikit commented Feb 5, 2023

Instead of the incorrect python3

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Merging #822 (5138827) into main (3a6b8e4) will increase coverage by 0.02%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   82.82%   82.84%   +0.02%     
==========================================
  Files          12       12              
  Lines        2276     2279       +3     
  Branches      201      205       +4     
==========================================
+ Hits         1885     1888       +3     
  Misses        384      384              
  Partials        7        7              
Impacted Files Coverage Δ
src/lib/tools.ts 78.97% <75.00%> (-0.12%) ⬇️
src/lsp/client.ts 66.41% <0.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gnikit gnikit force-pushed the fix/win-pip-install branch 2 times, most recently from 893aa1e to 35d3017 Compare February 5, 2023 16:04
@gnikit
Copy link
Member Author

gnikit commented Feb 5, 2023

To get the install location of the Python binaries (in case the application is not stored in the PATH)

python -c "import os, sysconfig;user_scripts_path = sysconfig.get_path('scripts', f'{os.name}_user');print(user_scripts_path)"

I think the extension should:

  • try to install fortls (or any python package) using pip with user permissions except raise an error
  • Check that it can be launched (i.e. pip install location is in PATH) if successful return True or undefined else run the above command to get the install location of the script, return the string.
  • On the receiving end, make sure to cache the location to avoid unnecessary execution of the python prompt.

@gnikit
Copy link
Member Author

gnikit commented Aug 7, 2023

Superseded by #824

@gnikit gnikit closed this Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant