Skip to content

Commit e8ec005

Browse files
committed
Merge pull request #3532 from mboersma/cli-insecure-platform-warning
fix(client): use pyOpenSSL for improved security features
2 parents 5574476 + 574b4d8 commit e8ec005

8 files changed

Lines changed: 30 additions & 38 deletions

File tree

client/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
build: setup-venv
3-
venv/bin/pip install docopt==0.6.2 python-dateutil==2.4.2 PyYAML==3.11 requests==2.5.1 git+https://github.com/pyinstaller/pyinstaller@7413317 tabulate==0.7.4 termcolor==1.1.0
3+
venv/bin/pip install -r requirements.txt git+https://github.com/pyinstaller/pyinstaller@7413317
44
venv/bin/pyinstaller deis.spec
55
chmod +x dist/deis
66

@@ -16,9 +16,6 @@ uninstall:
1616
clean:
1717
rm -rf build/ dist/ *.egg-info
1818

19-
client:
20-
pyinstaller deis.spec
21-
2219
installer: build
2320
@if [ ! -d makeself ]; then git clone -b single-binary https://github.com/deis/makeself.git; fi
2421
PATH=./makeself:$$PATH BINARY=deis makeself.sh --bzip2 --current --nox11 dist \
@@ -32,9 +29,9 @@ installer: build
3229

3330
setup-venv:
3431
@if [ ! -d venv ]; then virtualenv venv; fi
35-
venv/bin/pip install -q flake8==2.4.0
3632

3733
test-style: setup-venv
34+
venv/bin/pip install -q flake8==2.4.0
3835
venv/bin/flake8
3936

4037
test-unit:

client/deis.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
import requests
7373
from tabulate import tabulate
7474
from termcolor import colored
75+
import urllib3.contrib.pyopenssl
7576

7677
__version__ = '1.6.0-dev'
7778

@@ -80,6 +81,7 @@
8081

8182

8283
locale.setlocale(locale.LC_ALL, '')
84+
urllib3.contrib.pyopenssl.inject_into_urllib3()
8385

8486

8587
class Session(requests.Session):

client/deis.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ exe = EXE(pyz,
1414
debug=False,
1515
strip=None,
1616
upx=True,
17-
console=True )
17+
console=True)

client/requirements.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Deis CLI requirements
2+
3+
docopt==0.6.2
4+
ndg-httpsclient==0.3.3
5+
pyasn1==0.1.7
6+
pyOpenSSL==0.15.1
7+
python-dateutil==2.4.2
8+
PyYAML==3.11
9+
requests==2.5.1
10+
tabulate==0.7.4
11+
termcolor==1.1.0
12+
urllib3==1.10.2

client/setup.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
KWARGS = {'scripts': ['deis']}
2828

2929

30+
with open('requirements.txt') as f:
31+
required = f.read().splitlines()
32+
required = [r for r in required if r.strip() and not r.startswith('#')]
33+
34+
3035
setup(name='deis',
3136
version='1.6.0-dev',
3237
license=APACHE_LICENSE,
@@ -56,10 +61,6 @@
5661
('.', ['README.rst']),
5762
],
5863
long_description=LONG_DESCRIPTION,
59-
install_requires=[
60-
'docopt==0.6.2', 'python-dateutil==2.4.2',
61-
'PyYAML==3.11', 'requests==2.5.1',
62-
'tabulate==0.7.4', 'termcolor==1.1.0'
63-
],
64+
install_requires=required,
6465
zip_safe=True,
6566
**KWARGS)

controller/dev_requirements.txt

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
1-
# Deis client requirements
2-
docopt==0.6.2
3-
python-dateutil==2.4.2
4-
requests==2.5.1
5-
termcolor==1.1.0
6-
7-
# PyInstaller builds client binaries
8-
git+https://github.com/pyinstaller/pyinstaller@7413317
9-
10-
# Deis documentation requirements
11-
Sphinx==1.3.1
12-
smartypants==1.8.6
13-
sphinxcontrib-httpdomain==1.3.0
14-
15-
# Run "make coverage" for the % of code exercised during tests
1+
# Run "make coverage" or "make test-unit" for the % of code exercised during tests
162
coverage>=3.7.1
173

18-
# Generates template documentation in the Django admin
19-
docutils>=0.12
20-
214
# Run "make flake8" to check python syntax and style
225
flake8==2.4.0
236

docs/docs_requirements.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@ PyYAML==3.11
2323
South==1.0.2
2424
python-ldap==2.4.19
2525

26-
# Deis client requirements
26+
# Deis client requirements, copied from client/requirements.txt
2727
docopt==0.6.2
28+
ndg-httpsclient==0.3.3
29+
pyasn1==0.1.7
30+
pyOpenSSL==0.15.1
2831
python-dateutil==2.4.2
32+
#PyYAML==3.11
2933
requests==2.5.1
3034
tabulate==0.7.4
3135
termcolor==1.1.0
36+
urllib3==1.10.2
3237

3338
# Deis documentation requirements
3439
Sphinx==1.3.1

tests/bin/build-deis-cli.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)