From 64d8423132dbd370398182d8f8adc95cb9373f04 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 7 Jun 2016 17:45:59 +0700 Subject: [PATCH 1/2] Add Travis CI testing --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..86a4e4a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: + - 2.6 + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - nightly +script: + - python setup.py install + - pip install -e '.[subjectAltName_support]' From 42751632dd9c4a4fb8a8ae50612665d86176ea7c Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 7 Jun 2016 18:05:43 +0700 Subject: [PATCH 2/2] Set optional dependency pyasn1 version >=0.1.1 ndg_httpsclient is incompatible with pyasn1 0.0.11a0, which is shipped with Ubuntu precise. The first version of pyasn1 also compatible with Python 3 is 0.1.1. Also use a list for the extras_require dependency. --- .travis.yml | 28 +++++++++++++++++++++++++++- setup.py | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86a4e4a..20c8405 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,32 @@ python: - 3.4 - 3.5 - nightly + +before_install: + - PIP_VERSION=$(pip --version) + - | + if [[ ${PIP_VERSION:0:9} == 'pip 8.1.2' ]]; then + pip install --upgrade pip==8.1.1 + fi + + # Replicate an up to date precise system with python-openssl 0.12 + # and python-pyasn1 0.0.11a on Python 2.7 + - pip install PyOpenSSL==0.12 + - | + if [[ ${TRAVIS_PYTHON_VERSION:0:1} == '2.7' ]]; then + pip install pyasn1==0.0.11a0 + python -c "import pyasn1; assert pyasn1.__version__ == '0.0.11a0'" + fi + script: - - python setup.py install - pip install -e '.[subjectAltName_support]' + + # Confirm that pyasn1 is upgraded; see https://github.com/cedadev/ndg_httpsclient/issues/5 + - | + if [[ ${TRAVIS_PYTHON_VERSION:0:2} == '2.7' ]]; then + python -c "import pyasn1; assert pyasn1.__version__ != '0.0.11a0'" + fi + + # Also do a fresh install + - (cd /tmp && pip uninstall --yes ndg_httpsclient pyasn1 PyOpenSSL) + - python setup.py install diff --git a/setup.py b/setup.py index 5b51756..bc01179 100644 --- a/setup.py +++ b/setup.py @@ -139,7 +139,7 @@ ], }, install_requires=['PyOpenSSL'], - extras_require={'subjectAltName_support': 'pyasn1'}, + extras_require={'subjectAltName_support': ['pyasn1>=0.1.1']}, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Console',