diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-11-15 00:27:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 00:27:05 +0100 |
commit | 8fc5ed1b20c9c9fab75164aae1984698a46974dc (patch) | |
tree | d588d132137ce6b47c34ccc8c59117d2e75cb0b4 /scripts/internal/download_wheels_github.py | |
parent | fd69f22ee5ca38ceff32ae3fac15420c5d8fce29 (diff) | |
download | psutil-8fc5ed1b20c9c9fab75164aae1984698a46974dc.tar.gz |
Rewrite Linux prlimit() with ctypes (Linux wheels) (#1879)
Diffstat (limited to 'scripts/internal/download_wheels_github.py')
-rwxr-xr-x[-rw-r--r--] | scripts/internal/download_wheels_github.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/internal/download_wheels_github.py b/scripts/internal/download_wheels_github.py index 4aa50d5d..5623bb59 100644..100755 --- a/scripts/internal/download_wheels_github.py +++ b/scripts/internal/download_wheels_github.py @@ -21,6 +21,7 @@ import os import requests import zipfile +from psutil import __version__ as PSUTIL_VERSION from psutil._common import bytes2human from psutil.tests import safe_rmpath @@ -52,12 +53,25 @@ def download_zip(url): print("got %s, size %s)" % (OUTFILE, bytes2human(totbytes))) +def rename_win27_wheels(): + # See: https://github.com/giampaolo/psutil/issues/810 + src = 'dist/psutil-%s-cp27-cp27m-win32.whl' % PSUTIL_VERSION + dst = 'dist/psutil-%s-cp27-none-win32.whl' % PSUTIL_VERSION + print("rename: %s\n %s" % (src, dst)) + os.rename(src, dst) + src = 'dist/psutil-%s-cp27-cp27m-win_amd64.whl' % PSUTIL_VERSION + dst = 'dist/psutil-%s-cp27-none-win_amd64.whl' % PSUTIL_VERSION + print("rename: %s\n %s" % (src, dst)) + os.rename(src, dst) + + def run(): data = get_artifacts() download_zip(data['artifacts'][0]['archive_download_url']) os.makedirs('dist', exist_ok=True) with zipfile.ZipFile(OUTFILE, 'r') as zf: zf.extractall('dist') + rename_win27_wheels() def main(): |