mirror of
https://github.com/morgan9e/noiseprotocol
synced 2026-04-15 00:44:10 +09:00
Merge pull request #15 from plizonczyk/windows
Support for Windows and OS X
This commit is contained in:
48
.travis.yml
Normal file → Executable file
48
.travis.yml
Normal file → Executable 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
4
README.md
Normal file → Executable file
@@ -3,6 +3,7 @@ noiseprotocol
|
||||
[](https://travis-ci.org/plizonczyk/noiseprotocol)
|
||||
[](https://pypi.python.org/pypi/noiseprotocol)
|
||||
[](http://noiseprotocol.readthedocs.io/)
|
||||
[](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
22
appveyor.yml
Executable 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
3
setup.py
Normal file → Executable 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']),
|
||||
|
||||
Reference in New Issue
Block a user