scancode-toolkit icon indicating copy to clipboard operation
scancode-toolkit copied to clipboard

RFC: Drop native Windows support for WSL2

Open pombredanne opened this issue 4 years ago • 11 comments

There are many problems derived from supporting native Windows: since we are dealing with a lot of lower level paths and files and bytes handling we are exposed to many of the subtle differences between POSIX and Windows. As a result there is a lot of code that just handles all these quirks. With the advent of a decent POSIX support in Windows 10, I would like to drop entirely native Windows support and only support WSL. This basically means that we support Linux on Windows. This would simplify the codebase vastly, as well as the CI and tests.

This means that WSL https://docs.microsoft.com/en-us/windows/wsl/install-win10 would become a requirement on Windows.

pombredanne avatar Jan 14 '21 09:01 pombredanne

I've used pip with Bash on Windows (in Windows Terminal) with good success. Will that continue to be an option / recommendation?

BigBlueHat avatar May 11 '21 20:05 BigBlueHat

@BigBlueHat you wrote:

I've used pip with Bash on Windows (in Windows Terminal) with good success. Will that continue to be an option / recommendation?

Is this using cygwin? git bash? WSL2? which version of Python?

pombredanne avatar May 11 '21 21:05 pombredanne

git bash with Python 3.7.4. However, now that I'm trying to upgrade to the last version I am running into snags...but I've not yet determined if that's on my side (probably) or something wrong with scancode-toolkit specifically (probably not).

When I started to upgrade I tried the native Windows install (to replace my old pip-based install), but that sent me here...so now I'm back to pip...until I (probably) give up and try WSL--which I generally try to avoid due to the added layer of abstraction/tools/etc.

BigBlueHat avatar May 13 '21 15:05 BigBlueHat

D:\scancode-toolkit-21.7.30>scancode -h

  • Configuring ScanCode for first use...
  • WARNING: Native Windows may be deprecated in the future in favor of Windows Subsystem for Linux 2
  • WARNING: Please visit https://github.com/nexB/scancode-toolkit/issues/2366 for details and to provide feedback D:\python\python.exe: can't open file '3.6': [Errno 2] No such file or directory

How to solve this problem

cuiweining avatar Aug 05 '21 10:08 cuiweining

@cuiweining re:

D:\scancode-toolkit-21.7.30>scancode -h Configuring ScanCode for first use... WARNING: Native Windows may be deprecated in the future in favor of Windows Subsystem for Linux 2 WARNING: Please visit

RFC: Drop native Windows support for WSL2 #2366 for details and to provide feedback D:\python\python.exe: can't open file '3.6': [Errno 2] No such file or directory How to solve this problem

The latest ScanCode v21.8.4 has been released today to fix this issue. Do you mind to try it out?

pombredanne avatar Aug 05 '21 22:08 pombredanne

@pombredanne :

The problem was successfully resolved. After testing, the scancode -h command can be executed correctly in windows

cuiweining avatar Aug 06 '21 03:08 cuiweining

The problem was successfully resolved. After testing, the scancode -h command can be executed correctly in windows

@cuiweining thank you ++ for testing :+1:

pombredanne avatar Aug 06 '21 09:08 pombredanne

`C:\Users\26878\Desktop\1\scancode-toolkit-30.1.0>scancode -h

  • Configuring ScanCode for first use...
  • WARNING: Native Windows may be deprecated in the future in favor of Windows Subsystem for Linux 2
  • WARNING: Please visit https://github.com/nexB/scancode-toolkit/issues/2366 for details and to provide feedback ` How to solve this problem?My scancode-toolkit's version is v30.1.0

data1456 avatar Jan 17 '22 06:01 data1456

@data1456 the message is not a problem... the question is whether or not we want to support only WSL2.

pombredanne avatar Feb 02 '22 06:02 pombredanne

There are many problems derived from supporting native Windows: since we are dealing with a lot of lower level paths and files and bytes handling we are exposed to many of the subtle differences between POSIX and Windows. As a result there is a lot of code that just handles all these quirks.

Sorry for being semi-off-topic, but I'm really surprised by this statement. While I'm not too much into Python, I thought with Python being a cross-platform language, all the nasty platform-specific details would be abstracted away already (either by the language itself, it's stdlib, or popular third-party libraries). Is this not the case? Can you provide examples to satisfy my curiosity? 😉

sschuberth avatar Jul 14 '23 08:07 sschuberth

ich have also this problem, i used py3.9 and i followed the steps mentioned in scancode to install on windows. can you please support me when i come to the step "scancode -h" after extracting the scancode-toolkit-v32.0.1_py3.9-windows and set the directory to the scancode folder i have written this command to install the App , coan you please guide me where is the error:

C:\Spezial\scancode-toolkit-v32.1.0_py3.10-windows\scancode-toolkit-v32.1.0>scancode -h

  • Configuring ScanCode for first use...
  • WARNING: Native Windows may be deprecated in the future in favor of Windows Subsystem for Linux 2
  • WARNING: Please visit https://github.com/nexB/scancode-toolkit/issues/2366 for details and to provide feedback Der Befehl "py" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

Smmoa avatar May 02 '24 14:05 Smmoa