From dcb6d8286ba0f798c67f303564ea4ef9ed386d20 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 10 Sep 2015 20:23:37 +0300 Subject: [PATCH] Disable Cygwin support --- HISTORY.rst | 1 - platformio/__init__.py | 2 +- platformio/exception.py | 8 ++++++++ platformio/util.py | 7 +------ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 66b266ac..ad3dd7cc 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,7 +7,6 @@ PlatformIO 2.0 2.3.2 (2015-09-??) ~~~~~~~~~~~~~~~~~~ -* Allowed PlatformIO to be run within Cygwin environment * Allowed to use ST-Link uploader for mbed-based projects * Explained how to use ``lib`` directory from the PlatformIO based project in ``readme.txt`` which will be automatically generated using diff --git a/platformio/__init__.py b/platformio/__init__.py index 35c90956..0c80f511 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (2, 3, "2.dev3") +VERSION = (2, 3, "2.dev4") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/exception.py b/platformio/exception.py index 11998176..ce268018 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -196,3 +196,11 @@ class PlatformioUpgradeError(PlatformioException): "2. Try different installation/upgrading steps: " "http://docs.platformio.org/en/latest/installation.html" ) + + +class CygwinEnvDetected(PlatformioException): + + MESSAGE = ( + "PlatformIO does not work within Cygwin environment. " + "Use native Terminal instead." + ) diff --git a/platformio/util.py b/platformio/util.py index a10bfa44..d6657c15 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -116,13 +116,8 @@ def get_systype(): type_ = data[0].lower() arch = data[4].lower() if data[4] else "" - # use native Windows binaries for Cygwin if "cygwin" in type_: - if arch == "i686": - arch = "x86" - elif arch == "x86_64": - arch = "amd64" - type_ = "windows" + raise exception.CygwinEnvDetected() return "%s_%s" % (type_, arch) if arch else type_