Skip to content

Commit

Permalink
Accept pyOpenSSL >= 0.14 as a dependency iff it is already installed.
Browse files Browse the repository at this point in the history
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
  • Loading branch information
daira committed Sep 30, 2014
1 parent 2a6f8c3 commit e667143
Showing 1 changed file with 32 additions and 17 deletions.
49 changes: 32 additions & 17 deletions src/allmydata/_auto_deps.py
Expand Up @@ -118,13 +118,6 @@
#
"Nevow == 0.9.33, == 0.10",

# We don't want pyOpenSSL >= 0.14 because it depends on cffi
# (via cryptography), which currently has an unreliable build
# process for Windows.
# <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2193>
#
"pyOpenSSL == 0.13, == 0.13.1",

# pyasn1 is needed by twisted.conch in Twisted >= 9.0.
"pyasn1 >= 0.0.8a",
]
Expand All @@ -144,6 +137,31 @@
# Nevow >= 0.11.1 can be installed using pip.
"Nevow >= 0.11.1",

"service-identity", # this is needed to suppress complaints about being unable to verify certs
"characteristic >= 14.0.0", # latest service-identity depends on this version
"pyasn1 >= 0.1.4", # latest pyasn1-modules depends on this version
"pyasn1-modules", # service-identity depends on this
]

package_imports += [
('service-identity', 'service_identity'),
('characteristic', 'characteristic'),
('pyasn1-modules', 'pyasn1_modules'),
]

# If pyOpenSSL >= 0.14 is *already* installed, then accept it, otherwise
# require pyOpenSSL 0.13 or 0.13.1.
_can_use_pyOpenSSL_0_14 = False
try:
import OpenSSL
pyOpenSSL_ver = OpenSSL.__version__.split('.')
if int(pyOpenSSL_ver[0]) > 0 or int(pyOpenSSL_ver[1]) >= 14:
_can_use_pyOpenSSL_0_14 = True
except Exception:
pass

if _can_use_pyOpenSSL_0_14:
install_requires += [
# pyOpenSSL >= 0.13 is needed in order to fix
# <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2005>.
"pyOpenSSL >= 0.13",
Expand All @@ -154,23 +172,20 @@
# <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2286>).
#
"cryptography",
"cffi >= 0.8", # latest cryptography depends on this version
"six >= 1.4.1", # latest cryptography depends on this version
"pycparser", # cffi depends on this
"service-identity", # this is needed to suppress complaints about being unable to verify certs
"characteristic >= 14.0.0", # latest service-identity depends on this version
"pyasn1 >= 0.1.4", # latest pyasn1-modules depends on this version
"pyasn1-modules", # service-identity depends on this
"cffi >= 0.8", # latest cryptography depends on this version
"six >= 1.4.1", # latest cryptography depends on this version
"pycparser", # cffi depends on this
]

package_imports += [
('cryptography', 'cryptography'),
('cffi', 'cffi'),
('six', 'six'),
('pycparser', 'pycparser'),
('service-identity', 'service_identity'),
('characteristic', 'characteristic'),
('pyasn1-modules', 'pyasn1_modules'),
]
else:
install_requires += [
"pyOpenSSL == 0.13, == 0.13.1",
]


Expand Down

0 comments on commit e667143

Please sign in to comment.