From e9b0acaaa73613bc49a1a3dcf6950aa157aa5e71 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Wed, 18 Mar 2020 00:40:06 +0100 Subject: [PATCH] Enable Windows & OSX builds (#31) * Enable Windows & OSX builds * Add pypy for ubuntu * Fix isort * Disable PyPy typed-ast building fails due to a missing header ast27/Parser/tokenizer.c:17:10: fatal error: codecs.h: No such file or directory --- azure-pipelines.yml | 21 ++++++++++++++------- kasa/cli.py | 2 +- kasa/smartdevice.py | 6 +++--- kasa/smartstrip.py | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 70035fcb..8c3bcf8c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,16 +3,23 @@ trigger: pr: - master -pool: - vmImage: 'ubuntu-latest' strategy: matrix: - # Python36: - # python.version: '3.6' - Python37: + Python 3.7 Ubuntu: python.version: '3.7' - # Python38: - # python.version: '3.8' + vmImage: 'ubuntu-latest' +# PyPy Ubuntu: +# python.version: pypy3 +# vmImage: 'ubuntu-latest' + Python 3.7 Windows: + python.version: '3.7' + vmImage: 'windows-latest' + Python 3.7 OSX: + python.version: '3.7' + vmImage: 'macOS-latest' + +pool: + vmImage: $(vmImage) steps: - task: UsePythonVersion@0 diff --git a/kasa/cli.py b/kasa/cli.py index dc3d9666..7201888b 100755 --- a/kasa/cli.py +++ b/kasa/cli.py @@ -2,8 +2,8 @@ import asyncio import json import logging -from pprint import pformat as pf import re +from pprint import pformat as pf import click diff --git a/kasa/smartdevice.py b/kasa/smartdevice.py index 7cb39bf8..1a02ca31 100755 --- a/kasa/smartdevice.py +++ b/kasa/smartdevice.py @@ -11,12 +11,12 @@ Stroetmann which is licensed under the Apache License, Version 2.0. You may obtain a copy of the license at http://www.apache.org/licenses/LICENSE-2.0 """ -from collections import defaultdict -from datetime import datetime, timedelta -from enum import Enum import functools import inspect import logging +from collections import defaultdict +from datetime import datetime, timedelta +from enum import Enum from typing import Any, Dict, Optional from kasa.protocol import TPLinkSmartHomeProtocol diff --git a/kasa/smartstrip.py b/kasa/smartstrip.py index 36811b3a..27ca8817 100755 --- a/kasa/smartstrip.py +++ b/kasa/smartstrip.py @@ -2,9 +2,9 @@ .. todo:: describe how this interfaces with single plugs. """ -from collections import defaultdict import datetime import logging +from collections import defaultdict from typing import Any, DefaultDict, Dict, List, Optional from kasa.smartdevice import (