Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Limit Windows to python 3.7 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYsLab committed Feb 6, 2020
1 parent cd7029a commit 856b937
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

### Major features

* __Python 3.5+__ compatible.
* __Python 3.5+__ compatible for Linux and macOS.
* **Implements [PEP 492](https://www.python.org/dev/peps/pep-0492/)**
* **Applications developed with version 1.x of pymata_aio are backward compatible without modification.**
* __Python 3.7+__ compatible for Windows.
* **Implemented using the high efficiency Python [asyncio](https://docs.python.org/3/library/asyncio.html) library.**
* **Choose From 3 Included APIs**
* **pymata_core** - a pure asyncio method call API.
Expand Down
2 changes: 1 addition & 1 deletion pymata_aio/private_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PrivateConstants:
SYSEX_REALTIME = 0x7F # MIDI Reserved for realtime messages

# reserved for PyMata
PYMATA_VERSION = "2.33"
PYMATA_VERSION = "2.34"

# each byte represents a digital port
# and its value contains the current port settings
Expand Down
14 changes: 12 additions & 2 deletions pymata_aio/pymata_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,19 @@ def __init__(self, arduino_wait=4, sleep_tune=0.0001, log_output=False,
:returns: This method never returns
"""
# check to make sure that Python interpreter is version 3.5 or greater
# check to make sure that Python interpreter is version 3.5 or greater for
# linux and mac and version 3.7 for Windows
python_version = sys.version_info
if python_version[0] >= 3:

if sys.platform == 'win32':
if python_version[0] >= 3:
if python_version[1] >= 7:
pass
else:
print(
"ERROR: Python 3.7 or greater is required for use of this program with Windows.")
# version 3.5 or greater for linux/mac
elif python_version[0] >= 3:
if python_version[1] >= 5:
pass
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='pymata-aio',
version='2.34',
version='2.35',
packages=['pymata_aio', 'utilities'],
install_requires=['pyserial', 'websockets'],
entry_points={
Expand Down

0 comments on commit 856b937

Please sign in to comment.