Added error checking for python version & clarified README

This commit is contained in:
Rob McMullen 2018-09-24 11:25:33 -07:00
parent 956fd58294
commit 68b9e95512
3 changed files with 11 additions and 7 deletions

View File

@ -22,11 +22,8 @@ Supported Python versions:
* Python 3.6 (and later)
If you need Python 2 support, ``atrcopy`` 6.5 and earlier supports:
* Python 2.7
* Python 3.5
* Python 3.6
If you need Python 2 support, ``atrcopy`` 6.5 and earlier supports Python 2.7,
which you can install with ``pip install "atrcopy<7.0"``
Dependencies
------------

View File

@ -1,6 +1,12 @@
#!/usr/bin/env python
if __name__ == "__main__":
import atrcopy
import sys
if sys.version_info < (3, 6, 0):
print("atrcopy requires Python 3.6 or greater to run; this is Python %s" % ".".join([str(v) for v in sys.version_info[0:2]]))
if sys.version_info[0] == 2:
print("Python 2 support was dropped with atrcopy 7.0, so you can either use:\n\n pip install \"atrcopy<7.0\"\n\nto install a version compatible with Python 2, or install Python 3.6 or higher.")
else:
import atrcopy
atrcopy.run()
atrcopy.run()

View File

@ -33,6 +33,7 @@ setup(name="atrcopy",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
],
python_requires = '>=3.6',
install_requires = [
'numpy',
],