fix: Windows UTF-8 sdist + Darwin libomp / lightgbm CI paths#3
Conversation
…htgbm in CI - setup.py: open text files with encoding=utf-8 in build_pkg_info and build_sdist (avoids cp1252 UnicodeDecodeError embedding README on Windows). - .ci.sh: resolve libomp for Apple Silicon, Intel, and HOMEBREW_PREFIX; rm stale dylibs before copy; use pip show lightgbm for site-packages path. Made-with: Cursor
Made-with: Cursor
… exit code - sqlmath.mjs: coerce waitAsync timeout with Number/isFinite so test waitAsync() no-arg does not pass NaN to setTimeout under npm_config_mode_test (fixes TimeoutNaNWarning and flaky coverage). - jslint.mjs, jslint_ci.sh: v8CoverageReportCreate waits on child close and maps non-numeric code + signal to an integer exit code (Node can report null code on exit in some stdio/inherit cases). Made-with: Cursor
After sqlmath#3 is on beta, merge or rebase docs/readme-rewrite so CI and build_pkg_info see UTF-8-safe setup.py and updated .ci.sh.
Adds DEMO-MERGE-STRATEGY.md for Kai. PKG-INFO from build_pkg_info() after README + PR sqlmath#3 stack. Made-with: Cursor
Merge strategy and demo for #3 -> #1SummaryThis PR is intentionally split from the README PR (#1) so you can land tooling/CI fixes independently or replace them with your own approach.
Style — One Suggested merge order with PR #1If you want the README rewrite without re-breaking Windows or macOS CI, Demo on my fork (optional)On
Demo branch: local CI check (
|
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0780456..846bdee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -24,6 +24,8 @@ jobs:
node_version:
- "24"
os:
+ - macos-15-intel
- macos-latest
- ubuntu-latest
- windows-latest
git push origin HEAD:alpha -f
|
Kai (kaichu250) requested an Intel macOS runner alongside macos-latest.
Hard-coded /opt/homebrew-first lookup picked the wrong prefix on GitHub macos-15-intel (Intel Homebrew under /usr/local). Use `brew --prefix libomp` so the copy matches the keg brew installed.
Sync .ci.sh for the Actions step that checks out CI scripts from origin/alpha before shCiBase. Matches fix/windows-utf8-and-ci / PR sqlmath#3. Made-with: Cursor
|
I added the ci-workflow, here are the run details: |
- Wrap libomp comment and error printf in .ci.sh to 80 columns - Restore jslint.mjs and jslint_ci.sh to beta (exit handler, not close) Made-with: Cursor
quick follow-up...
|
Made-with: Cursor
… to lib_lightgbm_platform_arch.xxx, libomp_platform_arch.xxx, to prevent name-collision under darwin_arm64 and darwin_x64 builds.
Summary
Separate from the README PR (#1) so this can be merged or replaced independently.
setup.py
pyproject.toml,README.md,MANIFEST.in, and the sdist temp script withencoding="utf-8"sobuild_pkg_info/python setup.py sdistdo not use Windows cp1252 (fixesUnicodeDecodeErrorwhen README contains UTF-8)..ci.sh
libompfor Homebrew on Apple Silicon (/opt/homebrew), Intel (/usr/local), or$HOMEBREW_PREFIX.rm -fbefore copying dylibs so read-only artifacts do not breakcp.pip show lightgbm(notruff) for site-packages when copyinglib_lightgbm.Context: Windows traceback from
build_pkg_inforeading README; Intel Maclibomppath (issue #2).Made with Cursor