diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c95cf670 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +language: python +matrix: + include: + - os: linux + python: 3.6 + - os: linux + language: generic + env: PYTHON="3.7" MINICONDA_OS="Linux" + - os: linux + python: nightly + - os: osx + language: generic + env: PYTHON="3.6" MINICONDA_OS="MacOSX" + - os: osx + language: generic + env: PYTHON="3.7" MINICONDA_OS="MacOSX" + allow_failures: + - python: "nightly" + +before_install: + - if [[ $MINICONDA_OS ]]; then + URL="https://repo.continuum.io/miniconda/Miniconda3-latest-${MINICONDA_OS}-x86_64.sh"; + wget "${URL}" -O miniconda.sh; + bash miniconda.sh -b -p $HOME/miniconda; + export PATH="$HOME/miniconda/bin:$PATH"; + hash -r; + conda config --set always_yes yes --set changeps1 no; + conda update -q conda; + conda info -a; + conda create -q -n test-environment python=$PYTHON; + source activate test-environment; + fi; + +install: + - pip install -e .; + - pip install pytest; + +script: + - pytest diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..0b3b88fe --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,15 @@ +environment: + + matrix: + # https://www.appveyor.com/docs/windows-images-software/#python + - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python37" + - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python37-x64" + +install: + - '%PYTHON%\Scripts\pip install -e .' + - '%PYTHON%\Scripts\pip install pytest' +build: off +test_script: + - '%PYTHON%\Scripts\pytest' diff --git a/setup.py b/setup.py index 79e0e206..932d1c87 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,16 @@ from setuptools import setup +import sys def readme(): with open('README.md') as file: return file.read() +backports = [] + +if sys.version_info < (3, 7): + backports += ['dataclasses'] + setup( name='ppb', version='0.3.0', @@ -12,7 +18,7 @@ def readme(): install_requires=[ 'pygame', 'ppb-vector', - ], + ] + backports, url='https://github.com/pathunstrom/pursuedpybear', license='', author='Piper Thunstrom',