diff options
author | John W. Parent <45471568+johnwparent@users.noreply.github.com> | 2021-07-07 08:32:47 -0400 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2022-03-17 09:01:01 -0700 |
commit | e65d3d14b4a7a9a9667b006bea1f9f2eafc69472 (patch) | |
tree | f1a68cf906847887b44b9fe9afcf4cfc618d4a87 /bin/haspywin.py | |
parent | 4a73bfc3b9c4507f270951757475e514cd666ead (diff) | |
download | spack-e65d3d14b4a7a9a9667b006bea1f9f2eafc69472.tar.gz spack-e65d3d14b4a7a9a9667b006bea1f9f2eafc69472.tar.bz2 spack-e65d3d14b4a7a9a9667b006bea1f9f2eafc69472.tar.xz spack-e65d3d14b4a7a9a9667b006bea1f9f2eafc69472.zip |
Relocate spack_cmd and scripts from installer to root bin (#24651)
Relocate spack_cmd and scripts from installer
to root bin
Refactor documentation, installer, and launcher
to facilitate that change
Diffstat (limited to 'bin/haspywin.py')
-rw-r--r-- | bin/haspywin.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/haspywin.py b/bin/haspywin.py new file mode 100644 index 0000000000..ea08e74d41 --- /dev/null +++ b/bin/haspywin.py @@ -0,0 +1,20 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import subprocess +import sys + + +def getpywin(): + try: + import win32con # noqa + except ImportError: + subprocess.check_call( + [sys.executable, "-m", "pip", "-q", "install", "--upgrade", "pip"]) + subprocess.check_call( + [sys.executable, "-m", "pip", "-q", "install", "pywin32"]) + + +if __name__ == '__main__': + getpywin() |