diff --git a/.travis.yml b/.travis.yml index 4edf52296..1e7f80aa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,32 @@ sudo: false language: python +addons: + apt: + sources: + # Debian sid currently holds OpenSSL 1.0.2 + # change this with future releases! + - debian-sid + packages: + - libssl-dev + matrix: fast_finish: true include: - python: 2.7 - python: 2.7 - env: OPENSSL=1.0.2 - addons: - apt: - sources: - # Debian sid currently holds OpenSSL 1.0.2 - # change this with future releases! - - debian-sid - packages: - - libssl-dev - - python: pypy - - python: pypy - env: OPENSSL=1.0.2 - addons: - apt: - sources: - # Debian sid currently holds OpenSSL 1.0.2 - # change this with future releases! - - debian-sid - packages: - - libssl-dev + env: NO_ALPN=1 - language: generic os: osx osx_image: xcode7.1 + - python: 3.5 + env: SCOPE="netlib" + - python: 3.5 + env: NO_ALPN=1 + env: SCOPE="netlib" - python: 2.7 env: DOCS=1 - script: 'cd docs && make html' + script: 'cd mitmproxy/docs && make html' allow_failures: - python: pypy @@ -43,19 +38,6 @@ install: brew outdated openssl || brew upgrade openssl brew install python fi - - | - if [ "$TRAVIS_PYTHON_VERSION" = "pypy" ]; then - export PYENV_ROOT="$HOME/.pyenv" - if [ -f "$PYENV_ROOT/bin/pyenv" ]; then - pushd "$PYENV_ROOT" && git pull && popd - else - rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT" - fi - export PYPY_VERSION="4.0.1" - "$PYENV_ROOT/bin/pyenv" install --skip-existing "pypy-$PYPY_VERSION" - virtualenv --python="$PYENV_ROOT/versions/pypy-$PYPY_VERSION/bin/python" "$HOME/virtualenvs/pypy-$PYPY_VERSION" - source "$HOME/virtualenvs/pypy-$PYPY_VERSION/bin/activate" - fi - "pip install -U pip setuptools" - "pip install -e ./netlib[dev]" - "pip install -e ./pathod[dev]" @@ -65,17 +47,16 @@ before_script: - "openssl version -a" script: - - "py.test -s --cov libmproxy --timeout 30" + - "py.test -s --cov libmproxy --cov netlib --cov libpathod --timeout 30 ./test/$SCOPE" after_success: - coveralls - | if [[ $TRAVIS_OS_NAME == "osx" && $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]] then - git clone -q https://github.com/mitmproxy/release.git ../release - pip install -e ../release - python ../release/rtool.py bdist - python ../release/rtool.py upload-snapshot --sdist --bdist --wheel + pip install -e ./release + python ./release/rtool.py bdist + python ./release/rtool.py upload-snapshot --sdist --bdist --wheel fi notifications: diff --git a/mitmproxy/.coveragerc b/mitmproxy/.coveragerc deleted file mode 100644 index 7b2c16820..000000000 --- a/mitmproxy/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -include = *libmproxy* -exclude_lines = - pragma: nocover - pragma: no cover - raise NotImplementedError() -omit = *contrib*, *tnetstring*, *platform*, *console*, *main.py diff --git a/netlib/.coveragerc b/netlib/.coveragerc deleted file mode 100644 index ccbebf8c5..000000000 --- a/netlib/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -include = *netlib/netlib* -exclude_lines = - pragma: nocover - pragma: no cover - raise NotImplementedError() -omit = *contrib* diff --git a/netlib/netlib/tcp.py b/netlib/netlib/tcp.py index c8548aea2..61b41cdc0 100644 --- a/netlib/netlib/tcp.py +++ b/netlib/netlib/tcp.py @@ -31,7 +31,10 @@ else: socket_fileobject = socket.SocketIO EINTR = 4 -HAS_ALPN = OpenSSL._util.lib.Cryptography_HAS_ALPN +if os.environ.get("NO_ALPN"): + HAS_ALPN = False +else: + HAS_ALPN = OpenSSL._util.lib.Cryptography_HAS_ALPN # To enable all SSL methods use: SSLv23 # then add options to disable certain methods diff --git a/pathod/.coveragerc b/pathod/.coveragerc deleted file mode 100644 index 7e9782940..000000000 --- a/pathod/.coveragerc +++ /dev/null @@ -1,10 +0,0 @@ -[run] -branch = True - -[report] -show_missing = True -include = *libpathod* -exclude_lines = - pragma: nocover - pragma: no cover - raise NotImplementedError()