Merge pull request #15 from plizonczyk/windows

Support for Windows and OS X
This commit is contained in:
Piotr Lizończyk
2017-11-04 01:54:36 +01:00
committed by GitHub
4 changed files with 73 additions and 4 deletions

48
.travis.yml Normal file → Executable file
View File

@@ -1,15 +1,55 @@
language: python
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 <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_.
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 <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
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"

4
README.md Normal file → Executable file
View File

@@ -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.
@@ -17,6 +18,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:
```

22
appveyor.yml Executable file
View File

@@ -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 wheel"
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\*

3
setup.py Normal file → Executable file
View File

@@ -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']),