Skip to content

Commit 4275163

Browse files
committed
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.
1 parent 64d8423 commit 4275163

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.travis.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,32 @@ python:
66
- 3.4
77
- 3.5
88
- nightly
9+
10+
before_install:
11+
- PIP_VERSION=$(pip --version)
12+
- |
13+
if [[ ${PIP_VERSION:0:9} == 'pip 8.1.2' ]]; then
14+
pip install --upgrade pip==8.1.1
15+
fi
16+
17+
# Replicate an up to date precise system with python-openssl 0.12
18+
# and python-pyasn1 0.0.11a on Python 2.7
19+
- pip install PyOpenSSL==0.12
20+
- |
21+
if [[ ${TRAVIS_PYTHON_VERSION:0:1} == '2.7' ]]; then
22+
pip install pyasn1==0.0.11a0
23+
python -c "import pyasn1; assert pyasn1.__version__ == '0.0.11a0'"
24+
fi
25+
926
script:
10-
- python setup.py install
1127
- pip install -e '.[subjectAltName_support]'
28+
29+
# Confirm that pyasn1 is upgraded; see https://github.com/cedadev/ndg_httpsclient/issues/5
30+
- |
31+
if [[ ${TRAVIS_PYTHON_VERSION:0:2} == '2.7' ]]; then
32+
python -c "import pyasn1; assert pyasn1.__version__ != '0.0.11a0'"
33+
fi
34+
35+
# Also do a fresh install
36+
- (cd /tmp && pip uninstall --yes ndg_httpsclient pyasn1 PyOpenSSL)
37+
- python setup.py install

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
],
140140
},
141141
install_requires=['PyOpenSSL'],
142-
extras_require={'subjectAltName_support': 'pyasn1'},
142+
extras_require={'subjectAltName_support': ['pyasn1>=0.1.1']},
143143
classifiers=[
144144
'Development Status :: 5 - Production/Stable',
145145
'Environment :: Console',

0 commit comments

Comments
 (0)