From 4be08916581e9a2fb626bf146e18834ee94c6072 Mon Sep 17 00:00:00 2001 From: Piotr Lizonczyk Date: Fri, 3 Nov 2017 23:19:29 +0100 Subject: [PATCH 1/5] Trying out appveyor Windows builds --- appveyor.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100755 index 0000000..97842f9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,22 @@ +environment: + matrix: + - PYTHON: "C:\\Python35" + - PYTHON: "C:\\Python36" + - PYTHON: "C:\\Python35-x64" + - PYTHON: "C:\\Python36-x64" + +install: + - "%PYTHON%\\python.exe -m pip install -r requirements.txt" + - "%PYTHON%\\python.exe -m pip install pytest" + +build: off + +test_script: + - "%PYTHON%\\python.exe -m pytest" + +after_test: + - "%PYTHON%\\python.exe setup.py bdist_wheel" + +artifacts: + # bdist_wheel puts your built wheel in the dist directory + - path: dist\* From 08d0859a7942f5ac0ca522edecf8835b74b120fd Mon Sep 17 00:00:00 2001 From: Piotr Lizonczyk Date: Fri, 3 Nov 2017 23:33:32 +0100 Subject: [PATCH 2/5] Enable OS X build. Fix Windows build. Update README and trove classifiers in setup.py --- .travis.yml | 3 +++ README.md | 3 +++ appveyor.yml | 2 +- setup.py | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) mode change 100644 => 100755 .travis.yml mode change 100644 => 100755 README.md mode change 100644 => 100755 setup.py diff --git a/.travis.yml b/.travis.yml old mode 100644 new mode 100755 index a77f25a..bf57916 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: python +os: + - linux + - osx notifications: email: false python: diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 6318f01..94e34a4 --- a/README.md +++ b/README.md @@ -17,6 +17,9 @@ HandshakeState, CipherState and SymmetricState. Refer to the rest of the README ## Installation and prerequisites For now, only Python 3.5+ is supported. +The author provides support for Linux systems only. Although the CI systems perform testing on **Windows and OS X**, consider their support even **more experimental** than the whole package, though OS X usage should not differ from Linux. + +*Unless there is a dedicated contributor for Windows, the author won't provide any support for issues with using the noiseprotocol package on them. Python development on Windows is too painful, even considering my deep love for the OS.* Install via pip: ``` diff --git a/appveyor.yml b/appveyor.yml index 97842f9..01ea965 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ environment: install: - "%PYTHON%\\python.exe -m pip install -r requirements.txt" - - "%PYTHON%\\python.exe -m pip install pytest" + - "%PYTHON%\\python.exe -m pip install pytest wheel" build: off diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 2f5735f..93027fd --- a/setup.py +++ b/setup.py @@ -29,6 +29,9 @@ setup( 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', # 'Programming Language :: Python :: 3.7', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX :: Linux' ], keywords='cryptography noiseprotocol noise security', packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']), From 88eb72f5c3280d21a290383a77e0414fcb050da9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Lizo=C5=84czyk?= <3533647+plizonczyk@users.noreply.github.com> Date: Sat, 4 Nov 2017 00:04:35 +0100 Subject: [PATCH 3/5] Update .travis.yml --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index bf57916..c618492 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ language: python +matrix: + fast_finish: true + allow_failures: + - os: osx # Travis is SO slow with OS X. os: - linux - osx From 25cc97aa24aa3dedb877c1e3a93db57451e03d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Lizo=C5=84czyk?= <3533647+plizonczyk@users.noreply.github.com> Date: Sat, 4 Nov 2017 00:05:58 +0100 Subject: [PATCH 4/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 94e34a4..22fba6a 100755 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ noiseprotocol [![Build Status](https://travis-ci.org/plizonczyk/noiseprotocol.svg?branch=master)](https://travis-ci.org/plizonczyk/noiseprotocol) [![PyPI](https://img.shields.io/pypi/v/noiseprotocol.svg)](https://pypi.python.org/pypi/noiseprotocol) [![Documentation Status](https://readthedocs.org/projects/noiseprotocol/badge/)](http://noiseprotocol.readthedocs.io/) +[![AppVeyor Windows build status](https://ci.appveyor.com/api/projects/status/nta56n98cs7pbnpp?svg=true)](https://ci.appveyor.com/project/plizonczyk/noiseprotocol) This repository contains source code of **noiseprotocol** - a Python 3 implementation of [Noise Protocol Framework](http://www.noiseprotocol.org/). Compatible with revisions 32 and 33. From fa29011030f7d747fadcb6c3099fe44f36152f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Lizo=C5=84czyk?= <3533647+plizonczyk@users.noreply.github.com> Date: Sat, 4 Nov 2017 00:51:38 +0100 Subject: [PATCH 5/5] Update .travis.yml OS X workaround --- .travis.yml | 55 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index c618492..3dc1068 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,55 @@ language: python -matrix: - fast_finish: true - allow_failures: - - os: osx # Travis is SO slow with OS X. -os: - - linux - - osx -notifications: - email: false + python: - "3.5" - "3.6" - "3.5-dev" # 3.5 development branch - "3.6-dev" # 3.6 development branch -# - "3.7-dev" # 3.7 development branch + +matrix: + fast_finish: true + allow_failures: + - os: osx # Travis is SO slow with OS X. + include: + - os: osx + language: generic + env: PYTHON=3.5.4 + - os: osx + language: generic + env: PYTHON=3.6.3 + +notifications: + email: false + +# From https://pythonhosted.org/CodeChat/.travis.yml.html +before_install: | + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + brew update + # Per the `pyenv homebrew recommendations `_. + brew install openssl readline + # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages. + # I didn't do this above because it works and I'm lazy. + brew outdated pyenv || brew upgrade pyenv + # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3 + # doesn't provide Pip by default. So, use `pyenv-virtualenv `_. + brew install pyenv-virtualenv + pyenv install $PYTHON + # I would expect something like ``pyenv init; pyenv local $PYTHON`` or + # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to + # modify the Bash environment. ??? So, I hand-set the variables instead. + export PYENV_VERSION=$PYTHON + export PATH="/Users/travis/.pyenv/shims:${PATH}" + pyenv-virtualenv venv + source venv/bin/activate + # A manual check that the correct version of Python is running. + python --version + fi + # command to install dependencies install: - "pip install -r requirements.txt" - "pip install pytest-travis-fold" + # command to run tests -script: pytest +script: + - "python -m pytest"