Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I prefer to keep my Python environment as "clean" as possible, so I wanted to stop "installing" fortls essentially just to get the executable for VS Code to play nice.
I have added a script that uses the
distlib
package (which is what pip uses a fork of to create its executables) to build *.exe files and put them in the folder with the git repository.This will actually make it much easier to upgrade when there are new releases because I can just set my git repo to follow the master branch of this repo, and then if I get notified of a new release, I can simply do a git pull to update. The executable generated by this script will dynamically use whatever version of the package is in the folder next to it, so there is no need to remake the *.exe.
Because the exe will be present in the repo directory, but for obvious reasons don't want to commit the exe itself, we also add it to the
.gitignore
.It is also worth noting that essentially what this does is make a copy of the
fortls.py
file and embeds it in the executable, so updates to that file will not be reflected in the executable without a remake.That said, it seems obvious from the
..
added to the path in that script that it was intended to be used for some purpose like this one, which makes it curious that some capability like this wouldn't already be provided somewhere. It doesn't seem that pip is using this script either, so, for my curiosity, if this is not its original purpose, what is its purpose exactly?