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

rework discovery of pip installed version #502

Merged
merged 4 commits into from Oct 15, 2020

Conversation

ZeroPointEnergy
Copy link
Contributor

I ran across an issue when attempting to create a system wide installation with a package manager that the version could not be identified correctly.

This patch reworks the version discovery and used the importlib_metadata library to find the installed version (https://importlib-metadata.readthedocs.io/en/latest/using.html#using). This is part of python >=3.8, so it is only temporarily a new dependency.

To find the latest version I just made a direct request to the pypi API, which is probably also what pip does, just that we don't have to parse the CLI output and get an easy to parse json.

@ZeroPointEnergy
Copy link
Contributor Author

Fixed the formatting issue. Had to redo the whole commit, could not get git to preserve the content of the merge commit on a rebase for some reason. Sorry

@k9ert k9ert merged commit f0a5f8c into cryptoadvance:master Oct 15, 2020
@k9ert
Copy link
Collaborator

k9ert commented Oct 15, 2020

Always a pleasure to merge a PR which removes more code than it creates :-).

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.

None yet

2 participants