Skip to content

Commit f20d6d5

Browse files
committed
Depend on PyOpenSSL for SNI support (fixes #430)
This is only required for Python 2.X on Mac OS X. Signed-off-by: Sebastian Ramacher <[email protected]>
1 parent 6966e2e commit f20d6d5

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ def initialize_options(self):
135135
]
136136
data_files.extend(man_pages)
137137

138+
install_requires = [
139+
'pygments',
140+
'requests'
141+
]
142+
138143
extras_require = {
139144
'urwid' : ['urwid']
140145
}
@@ -161,6 +166,10 @@ def initialize_options(self):
161166
if not using_setuptools:
162167
scripts.append('data/bpython-curtsies')
163168

169+
if sys.version_info[0] == 2 and sys.platform == "darwin":
170+
# need PyOpenSSL for SNI support (only 2.X and on Darwin)
171+
install_requires.append('PyOpenSSL')
172+
164173
# translations
165174
mo_files = list()
166175
for language in os.listdir(translations_dir):
@@ -178,10 +187,7 @@ def initialize_options(self):
178187
url = "http://www.bpython-interpreter.org/",
179188
long_description = """bpython is a fancy interface to the Python
180189
interpreter for Unix-like operating systems.""",
181-
install_requires = [
182-
'pygments',
183-
'requests'
184-
],
190+
install_requires = install_requires,
185191
extras_require = extras_require,
186192
tests_require = ['mock', 'unittest2'],
187193
packages = packages,

0 commit comments

Comments
 (0)