diff --git a/misc/download-mypyc-wheels.py b/misc/download-mypyc-wheels.py deleted file mode 100755 index 0b9722cabd574..0000000000000 --- a/misc/download-mypyc-wheels.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python3 -# Script for downloading mypyc-compiled mypy wheels in preparation for a release - -import os -import os.path -import sys -from urllib.request import urlopen - - -PLATFORMS = [ - 'macosx_10_{macos_ver}_x86_64', - 'manylinux1_x86_64', - 'win_amd64', -] -MIN_VER = 5 -MAX_VER = 8 -BASE_URL = "https://github.com/mypyc/mypy_mypyc-wheels/releases/download" -URL = "{base}/v{version}/mypy-{version}-cp3{pyver}-cp3{pyver}{abi_tag}-{platform}.whl" - -def download(url): - print('Downloading', url) - name = os.path.join('dist', os.path.split(url)[1]) - with urlopen(url) as f: - data = f.read() - with open(name, 'wb') as f: - f.write(data) - -def download_files(version): - for pyver in range(MIN_VER, MAX_VER + 1): - for platform in PLATFORMS: - abi_tag = "" if pyver >= 8 else "m" - macos_ver = 9 if pyver >= 6 else 6 - url = URL.format( - base=BASE_URL, - version=version, - pyver=pyver, - abi_tag=abi_tag, - platform=platform.format(macos_ver=macos_ver) - ) - # argh, there is an inconsistency here and I don't know why - if 'win_' in platform: - parts = url.rsplit('/', 1) - parts[1] = parts[1].replace("+dev", ".dev") - url = '/'.join(parts) - - download(url) - -def main(argv): - if len(argv) != 2: - sys.exit("Usage: download-mypy-wheels.py version") - - os.makedirs('dist', exist_ok=True) - download_files(argv[1]) - -if __name__ == '__main__': - main(sys.argv) diff --git a/misc/test_installed_version.sh b/misc/test_installed_version.sh deleted file mode 100755 index 7182c9556a12a..0000000000000 --- a/misc/test_installed_version.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -ex - -# Usage: misc/test_installed_version.sh [wheel] [python command] -# Installs a version of mypy into a virtualenv and tests it. - -# A bunch of stuff about mypy's code organization and test setup makes -# it annoying to test an installed version of mypy. If somebody has a -# better way please let me know. - -function abspath { - python3 -c "import os.path; print(os.path.abspath('$1'))" -} - -TO_INSTALL="${1-.}" -PYTHON="${2-python3}" -VENV="$(mktemp -d -t mypy-test-venv.XXXXXXXXXX)" -trap "rm -rf '$VENV'" EXIT - -"$PYTHON" -m virtualenv "$VENV" -source "$VENV/bin/activate" - -ROOT="$PWD" -TO_INSTALL="$(abspath "$TO_INSTALL")" - -# Change directory so we can't pick up any of the stuff in the root. -# We need to do this before installing things too because I was having -# the current mypy directory getting picked up as satisfying the -# requirement (argh!) -cd "$VENV" - -pip install -r "$ROOT/test-requirements.txt" -pip install $TO_INSTALL - -# pytest looks for configuration files in the parent directories of -# where the tests live. Since we are trying to run the tests from -# their installed location, we copy those into the venv. Ew ew ew. -cp "$ROOT/pytest.ini" "$ROOT/conftest.py" "$VENV/" - -# Find the directory that mypy tests were installed into -MYPY_TEST_DIR="$(python3 -c 'import mypy.test; print(mypy.test.__path__[0])')" -# Run the mypy tests -MYPY_TEST_PREFIX="$ROOT" python3 -m pytest "$MYPY_TEST_DIR"/test*.py