Skip to content

Commit

Permalink
Removed dependency on setuptools for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayrx committed Mar 8, 2014
1 parent e4880e6 commit 4dd97e5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cryptography/hazmat/bindings/commoncrypto/binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@

from __future__ import absolute_import, division, print_function

import sys
import platform

from pkg_resources import parse_version

from cryptography.hazmat.bindings.utils import build_ffi


Expand Down Expand Up @@ -48,5 +47,5 @@ def _ensure_ffi_initialized(cls):

@classmethod
def is_available(cls):
version = parse_version(platform.mac_ver()[0])
return version >= parse_version("10.8")
return sys.platform == "darwin" and map(
int, platform.mac_ver()[0].split(".")) >= [10, 8, 0]

0 comments on commit 4dd97e5

Please sign in to comment.