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

Script to make local exe #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Script to make local exe #139

wants to merge 2 commits into from

Conversation

emanspeaks
Copy link
Contributor

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?

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