summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-02-11 23:04:38 +0100
committerGitHub <noreply@github.com>2020-02-11 23:04:38 +0100
commit9e2ca978b211993066b0dc41da9aa63429655406 (patch)
treecb46fc9c1d42d7681a79be303292ee47b33d40b9 /scripts
parentd8cb832f8cc7ef2695472ec0f752c59c72916274 (diff)
downloadpsutil-9e2ca978b211993066b0dc41da9aa63429655406.tar.gz
Add support for PyPy on Windows (#1686)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/internal/winmake.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/internal/winmake.py b/scripts/internal/winmake.py
index ac08c03f..fe0a73dc 100755
--- a/scripts/internal/winmake.py
+++ b/scripts/internal/winmake.py
@@ -36,6 +36,7 @@ GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
PY3 = sys.version_info[0] == 3
HERE = os.path.abspath(os.path.dirname(__file__))
ROOT_DIR = os.path.realpath(os.path.join(HERE, "..", ".."))
+PYPY = '__pypy__' in sys.builtin_module_names
DEPS = [
"coverage",
"flake8",
@@ -43,7 +44,6 @@ DEPS = [
"pdbpp",
"pip",
"pyperf",
- "pypiwin32==219" if sys.version_info[:2] <= (3, 4) else "pypiwin32",
"pyreadline",
"setuptools",
"wheel",
@@ -56,6 +56,12 @@ if sys.version_info[:2] <= (2, 7):
DEPS.append('mock')
if sys.version_info[:2] <= (3, 2):
DEPS.append('ipaddress')
+if PYPY:
+ pass
+elif sys.version_info[:2] <= (3, 4):
+ DEPS.append("pypiwin32==219")
+else:
+ DEPS.append("pypiwin32")
_cmds = {}
if PY3:
@@ -268,8 +274,8 @@ def upload_wheels():
def install_pip():
"""Install pip"""
try:
- import pip # NOQA
- except ImportError:
+ sh('%s -c "import pip"' % PYTHON)
+ except SystemExit:
if PY3:
from urllib.request import urlopen
else: