node-python: thêm build-essential (make, g++) cho node-gyp / pip build module native #12

Merged
thuanle merged 1 commits from node-python-build-essential into main 2026-11-18 09:23:19 +07:00

Image node-python (runner label python) có python3 nhưng thiếu make và g++. Vì vậy module Node có phần native, như better-sqlite3, không biên dịch được bằng node-gyp khi không tải được bản prebuilt. pip build wheel có phần C cũng gặp vấn đề tương tự.

Thay đổi: thêm build-essential vào node-python/Dockerfile, cập nhật README.

Đã thử local:

  • docker build node-python: OK.
  • Trong image: Node 26.13.1, Python 3.13.5, GNU Make 4.4.1, g++ 14.2.0.
  • npm_config_build_from_source=true npm ci của repo tl-noti: build better-sqlite3 từ nguồn thành công; npm run build OK; test 55/55 pass.

Dùng cho: CI của tl-noti sẽ chạy runs-on: python, bỏ bước apt-get install mỗi lần chạy.

Image `node-python` (runner label `python`) có python3 nhưng thiếu `make` và `g++`. Vì vậy module Node có phần native, như `better-sqlite3`, không biên dịch được bằng node-gyp khi không tải được bản prebuilt. pip build wheel có phần C cũng gặp vấn đề tương tự. Thay đổi: thêm `build-essential` vào `node-python/Dockerfile`, cập nhật README. Đã thử local: - `docker build node-python`: OK. - Trong image: Node 26.13.1, Python 3.13.5, GNU Make 4.4.1, g++ 14.2.0. - `npm_config_build_from_source=true npm ci` của repo tl-noti: build `better-sqlite3` từ nguồn thành công; `npm run build` OK; test 55/55 pass. Dùng cho: CI của tl-noti sẽ chạy `runs-on: python`, bỏ bước `apt-get install` mỗi lần chạy.
claudecode Bot added 1 commit 2026-11-18 08:57:17 +07:00
node-python: thêm build-essential (make, g++) cho node-gyp / pip build module native
node-python image / build (amd64) (push) Successful in 1m11s
node-python image / build (arm64) (push) Successful in 1m6s
node-python image / amend-manifest (push) Successful in 10s
751de78f76
Image node-python có python3 nhưng thiếu make/g++, nên module Node có phần native
(vd better-sqlite3) không biên dịch được khi không tải được prebuilt.
Đã thử: docker build OK; trong image, npm ci của tl-noti build better-sqlite3 từ
nguồn thành công, 55/55 test pass.
codex Bot approved these changes 2026-11-18 09:03:51 +07:00
codex Bot left a comment

Verdict

APPROVED — The change installs the promised native build toolchain, keeps the normal Python virtual-environment contract intact, and both local and CI image builds pass.

Requirements

met

Verification

  • git rev-parse HEAD → 751de78f761ddaf3b1cb3255f30ac4b5ceae0789; git status --porcelain produced no output.
  • docker build -t base-pr12-node-python:review -f node-python/Dockerfile node-python → Successfully built 790d9f9dc78c.
  • Normal container PATH probe → /opt/venv/bin, Python 3.13.5, pip 26.3, GNU Make 4.4.1, g++ 14.2.0.
  • Native compile probe → g++ /tmp/native.cpp -o /tmp/native exited 0 and the binary printed native-ok; the Python probe printed python-ok.
  • PR CI completed successfully for build (amd64), build (arm64), and amend-manifest.
  • No repository unit-test suite is present; the image build plus direct toolchain/compile checks are the available focused verification.

Previous findings

None.

Strengths

  • Directly addresses native node-gyp and Python C-extension builds in the runner image.
  • Updates the README toolchain inventory alongside the Dockerfile change.
  • Retains the existing virtual-environment PATH setup and cleans APT package lists after installation.

Findings

None.

Declined to judge

None.

paseo-flow followups: 0

### Verdict APPROVED — The change installs the promised native build toolchain, keeps the normal Python virtual-environment contract intact, and both local and CI image builds pass. ### Requirements met ### Verification - `git rev-parse HEAD` → `751de78f761ddaf3b1cb3255f30ac4b5ceae0789`; `git status --porcelain` produced no output. - `docker build -t base-pr12-node-python:review -f node-python/Dockerfile node-python` → `Successfully built 790d9f9dc78c`. - Normal container PATH probe → `/opt/venv/bin`, Python `3.13.5`, pip `26.3`, GNU Make `4.4.1`, g++ `14.2.0`. - Native compile probe → `g++ /tmp/native.cpp -o /tmp/native` exited 0 and the binary printed `native-ok`; the Python probe printed `python-ok`. - PR CI completed successfully for `build (amd64)`, `build (arm64)`, and `amend-manifest`. - No repository unit-test suite is present; the image build plus direct toolchain/compile checks are the available focused verification. ### Previous findings None. ### Strengths - Directly addresses native `node-gyp` and Python C-extension builds in the runner image. - Updates the README toolchain inventory alongside the Dockerfile change. - Retains the existing virtual-environment PATH setup and cleans APT package lists after installation. ### Findings None. ### Declined to judge None. paseo-flow followups: 0

✅ Đã APPROVED, chờ bạn duyệt merge

✅ Đã APPROVED, chờ bạn duyệt merge
thuanle merged commit 50b388ed58 into main 2026-11-18 09:23:19 +07:00
Sign in to join this conversation.
No Reviewers
codex Bot
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: public/base#12