Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv build with msvc, the console output is abnormal #10073

Open
fanck0605 opened this issue Dec 21, 2024 · 2 comments
Open

uv build with msvc, the console output is abnormal #10073

fanck0605 opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working windows Specific to the Windows platform

Comments

@fanck0605
Copy link

fanck0605 commented Dec 21, 2024

Environment

Platform: Windows 10 (Chinese Language)
Console charsets: GBK
UV: 0.5.11

Details

I tried to build a .pyd file using scikit-build-core on Windows (msvc backend), when i use uv build, the output of msvc cannot print abnormal in prowershell console (like this ����ɴ��������), while i directly using python -m build will not.

This may be caused by uv build not handling non-UTF-8 charsets well. Can anyone fix it?

Console output

-- Build files have been written to: C:/Users/User/AppData/Local/Temp/tmpz_8ybcie/build
*** Building project with Visual Studio 16 2019...
���� .NET Framework �� Microsoft (R) ��������汾 16.11.2+f32259642
��Ȩ����(C) Microsoft Corporation����������Ȩ����

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: �м�Ŀ¼�����Ŀ¼�޷�פ������ʱĿ¼�£���Ϊ����ܻᵼ���������ɳ������⡣ [C:\Users\User\AppData\Local\Temp\tmpz_8ybcie\build\ZERO_CHECK.vcxproj]
  1>Checking Build System
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: �м�Ŀ¼�����Ŀ¼�޷�פ������ʱĿ¼�£���Ϊ����ܻᵼ���������ɳ������⡣ [C:\Users\User\AppData\Local\Temp\tmpz_8ybcie\build\_core.vcxproj]
  Building Custom Rule D:/.uv/cache/sdists-v6/.tmpJfNZWj/scikit_build_example-0.0.1/CMakeLists.txt
  main.cpp
    ���ڴ����� C:/Users/User/AppData/Local/Temp/tmpz_8ybcie/build/Release/_core.lib �Ͷ��� C:/Users/User/AppData/Local/Temp/tmpz_8ybcie/build/Release/_core.exp
  _core.vcxproj -> C:\Users\User\AppData\Local\Temp\tmpz_8ybcie\build\Release\_core.cp312-win_amd64.pyd

Reproduce

  1. Install Visual Stutio Build Tools

  2. Run uv build

git clone https://github.com/pybind/scikit_build_example.git
cd scikit_build_example
uv build
@anqorithm
Copy link

It works fine when using the uv command on WSL (Ubuntu on Windows) with the same environment. It seems that the issue is related to character encoding handling on Windows 10 with the GBK charset, which is causing problems with non-UTF-8 characters in the output.

Running the uv build command under WSL avoids this issue, as it uses a different console environment that handles the character encoding more effectively.

Let me know if you'd like further assistance!

Image

@charliermarsh charliermarsh added bug Something isn't working windows Specific to the Windows platform labels Dec 21, 2024
@charliermarsh
Copy link
Member

Seems like a bug, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

3 participants