From 03f3e841176d3b1f94fd9434943b16441493dbc1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 29 Dec 2025 22:32:57 +0100 Subject: drop Cygwin, it's obsolete --- project/os.py | 11 ++--------- project/toolset.py | 5 +---- project/utils.py | 11 ++--------- 3 files changed, 5 insertions(+), 22 deletions(-) (limited to 'project') diff --git a/project/os.py b/project/os.py index cb5bd44..db489ce 100644 --- a/project/os.py +++ b/project/os.py @@ -10,7 +10,6 @@ import platform class OS(Enum): WINDOWS = 'Windows' LINUX = 'Linux' - CYGWIN = 'Cygwin' MACOS = 'macOS' def __str__(self): @@ -25,8 +24,6 @@ class OS(Enum): return OS.LINUX if system == 'Darwin': return OS.MACOS - if system.startswith('CYGWIN_NT'): - return OS.CYGWIN raise NotImplementedError(f'unsupported OS: {system}') @@ -36,7 +33,7 @@ def on_windows(): def on_windows_like(): os = OS.current() - return os is OS.WINDOWS or os is OS.CYGWIN + return os is OS.WINDOWS def on_linux(): @@ -45,8 +42,4 @@ def on_linux(): def on_linux_like(): os = OS.current() - return os is OS.LINUX or os is OS.CYGWIN or os is OS.MACOS - - -def on_cygwin(): - return OS.current() is OS.CYGWIN + return os is OS.LINUX or os is OS.MACOS diff --git a/project/toolset.py b/project/toolset.py index 35d5192..73e0852 100644 --- a/project/toolset.py +++ b/project/toolset.py @@ -14,9 +14,6 @@ limited to: | Windows | make [1] | Clang [2] | | | | MinGW-w64 | | | msbuild | MSVC | -| Cygwin | make | Clang | -| | | GCC | -| | | MinGW-w64 | 1. Both GNU make and MinGW mingw32-make. 2. clang-cl is supported by Boost 1.69.0 or higher only. @@ -472,7 +469,7 @@ class CMakeCustom(Toolset): if shutil.which('mingw32-make'): return 'MinGW Makefiles' return 'Unix Makefiles' - # On Linux/Cygwin, make all the way: + # On Linux, make all the way: return 'Unix Makefiles' @staticmethod diff --git a/project/utils.py b/project/utils.py index 6697ff7..1be2b55 100644 --- a/project/utils.py +++ b/project/utils.py @@ -28,19 +28,12 @@ def full_exe_name(exe): if not project.os.on_windows_like(): # There's no PATHEXT on Linux. return exe - # b2 on Windows/Cygwin doesn't like it when the executable name doesn't - # include the extension. + # b2 on Windows doesn't like it when the executable name doesn't include + # the extension. dir_path = os.path.dirname(exe) or None path = shutil.which(exe, path=dir_path) if not path: raise RuntimeError(f"executable '{exe}' could not be found") - if project.os.on_cygwin(): - # On Cygwin, shutil.which('gcc') == '/usr/bin/gcc' and shutil.which('gcc.exe') - # == '/usr/bin/gcc.exe'; we want the latter version. shutil.which('clang++') - # == '/usr/bin/clang++' is fine though, since it _is_ the complete path - # (clang++ is a symlink). - if os.path.exists(path) and os.path.exists(path + '.exe'): - path += '.exe' if dir_path: # If it was found in a specific directory, include the directory in the # result. shutil.which returns the executable name prefixed with the -- cgit v1.3