Version 0.4.0: Allow installation (but not usage) with Python 2.7 · simonrob/pyoslog@3c8a274 · GitHub
Skip to content

Commit 3c8a274

Browse files
committed
Version 0.4.0: Allow installation (but not usage) with Python 2.7
1 parent 0323e5f commit 3c8a274

4 files changed

Lines changed: 21 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions

‎pyoslog/__version__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = 'pyoslog'
2-
__version__ = '0.3.0'
2+
__version__ = '0.4.0'
33
__description__ = 'Send messages to the macOS unified logging system'
44
__author__ = 'Simon Robinson'
55
__author_email__ = 'simon@robinson.ac'

‎pyoslog/compatibility.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ def is_supported():
66
"""Unified logging is only present in macOS 10.12 and later, but it is nicer to not have to check OS type or version
77
strings when installing or importing the module - use this method at runtime to check whether it is supported. It is
88
important to note that if is_supported() is False then none of the module's other methods/constants will exist."""
9-
return sys.platform == 'darwin' and float('.'.join(platform.mac_ver()[0].split('.')[:2])) >= 10.12
9+
return sys.platform == 'darwin' and sys.version_info >= (3, 0,) and float(
10+
'.'.join(platform.mac_ver()[0].split('.')[:2])) >= 10.12

‎setup.py‎

Lines changed: 15 additions & 6 deletions

0 commit comments

Comments
 (0)