Show error message when user tries to install/run PlatformIO with Python 3

This commit is contained in:
Ivan Kravets
2015-12-26 20:22:22 +02:00
parent f7311eb94d
commit 1b84078541
2 changed files with 10 additions and 2 deletions

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
VERSION = (2, 7, "0.dev0")
__version__ = ".".join([str(s) for s in VERSION])
@ -31,3 +33,10 @@ __license__ = "Apache Software License"
__copyright__ = "Copyright 2014-2015 Ivan Kravets"
__apiurl__ = "http://api.platformio.org"
if sys.version_info >= (3, 0, 0):
msg = ("PlatformIO version %s does not run under Python version %s.\n"
"Python 3 is not yet supported.\n")
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
sys.exit(1)

View File

@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import find_packages, setup
from platformio import (__author__, __description__, __email__, __license__,
__title__, __url__, __version__, util)
__title__, __url__, __version__)
setup(