Skip to content

fix: Build python bindings in the build-dir spglib subdirectory#606

Merged
LecrisUT merged 6 commits intospglib:developfrom
DanielYang59:fix-dev-build-win
Sep 15, 2025
Merged

fix: Build python bindings in the build-dir spglib subdirectory#606
LecrisUT merged 6 commits intospglib:developfrom
DanielYang59:fix-dev-build-win

Conversation

@DanielYang59
Copy link
Copy Markdown
Contributor

@DanielYang59 DanielYang59 commented Sep 13, 2025

fix #552

The original issue turns out to be Windows requires Admin to create symlink by default:

EXEC : CMake error : failed to create symbolic link 'C:/Users/Yang/AppData/Local/Temp/tmph2mhsunn/build/python/spglib/_spglib.cp313-win_amd64.pyd': A required privilege is not held by the client. [C:\Users\Yang\AppData\Local\Temp\tmph2mhsunn\build\python\Spglib_python.vcxproj]

Tested on my Windows 11 24H2 machine

@atztogo atztogo requested a review from LecrisUT September 14, 2025 04:44
@LecrisUT
Copy link
Copy Markdown
Collaborator

Ah, that makes sense. Curious, how does hardlink compare in that case? Other than that, we could probably simplify it by building the artifact in the spglib subfolder directly

@DanielYang59 DanielYang59 changed the title cmake use copy in windows cmake build directly in spglib subdirectory to fix symlink permission issue on Windows Sep 15, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.48%. Comparing base (98d2137) to head (ae4b1a3).
⚠️ Report is 59 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #606   +/-   ##
========================================
  Coverage    74.48%   74.48%           
========================================
  Files           26       26           
  Lines         7888     7888           
  Branches      1638     1637    -1     
========================================
  Hits          5875     5875           
  Misses        1534     1534           
  Partials       479      479           
Flag Coverage Δ
c_api 69.42% <ø> (ø)
fortran_api 52.91% <ø> (ø)
python_api 67.34% <ø> (ø)
unit_tests 11.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LecrisUT LecrisUT added this to the 2.7 milestone Sep 15, 2025
@LecrisUT LecrisUT changed the title cmake build directly in spglib subdirectory to fix symlink permission issue on Windows fix: Build python bindings in the build-dir spglib subdirectory Sep 15, 2025
@LecrisUT LecrisUT enabled auto-merge (squash) September 15, 2025 10:27
@LecrisUT LecrisUT merged commit 4add188 into spglib:develop Sep 15, 2025
39 of 51 checks passed
@DanielYang59 DanielYang59 deleted the fix-dev-build-win branch September 15, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building wheels seems to require admin privilege on Windows

2 participants