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

version collection on Windows #200

Closed
loriab opened this issue Dec 16, 2019 · 0 comments · Fixed by #201
Closed

version collection on Windows #200

loriab opened this issue Dec 16, 2019 · 0 comments · Fixed by #201

Comments

@loriab
Copy link
Collaborator

loriab commented Dec 16, 2019

Describe the bug
Idk if it's Azure, Windows, or general script echoing, but the usual version printing is incorporating the path, and then the safe_version madly join/hyphenates the result. I'll fix this for psi4, so this is an fyi should others hit bizarre versions.

    def get_version(self) -> str:
        self.found(raise_error=True)

        which_prog = which("psi4")
        print("v0:", which_prog)
        print("v1:", self.version_cache)
        with popen([which_prog, "--version"]) as exc:
            exc["proc"].wait(timeout=30)
        print("v2:", exc["stdout"])
        print("v3:", exc["stdout"].strip())
        print("v4:", safe_version(exc["stdout"]))
        if which_prog not in self.version_cache:
            with popen([which_prog, "--version"]) as exc:
                exc["proc"].wait(timeout=30)
            self.version_cache[which_prog] = safe_version(exc["stdout"])
2019-12-15T22:49:01.4454072Z v2: 
2019-12-15T22:49:01.4454364Z 
2019-12-15T22:49:01.4454695Z D:\a\1\b>C:/tools/miniconda3/python.exe D:\a\1\b\install\bin\psi4 --version 
2019-12-15T22:49:01.4454997Z 
2019-12-15T22:49:01.4455300Z 1.4a2.dev345
2019-12-15T22:49:01.4455611Z 
2019-12-15T22:49:01.4455891Z 
2019-12-15T22:49:01.4456222Z v3: D:\a\1\b>C:/tools/miniconda3/python.exe D:\a\1\b\install\bin\psi4 --version 
2019-12-15T22:49:01.4456545Z 
2019-12-15T22:49:01.4456851Z 1.4a2.dev345
2019-12-15T22:49:01.4457188Z v4: -D-a-1-b-C-tools-miniconda3-python.exe.D-a-1-b-install-bin-psi4.-version.-1.4a2.dev345-
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 a pull request may close this issue.

1 participant