Skip to content

meson: remove Python from default build path#4707

Open
Alb3e3 wants to merge 1 commit into
facebook:devfrom
Alb3e3:alb3e3/meson-python-free-build
Open

meson: remove Python from default build path#4707
Alb3e3 wants to merge 1 commit into
facebook:devfrom
Alb3e3:alb3e3/meson-python-free-build

Conversation

@Alb3e3

@Alb3e3 Alb3e3 commented Jul 9, 2026

Copy link
Copy Markdown

Addresses #4641.

This removes the Python helper scripts from the default Meson setup/install path:

  • replaces the setup-time GetZstdLibraryVersion.py call with Meson DSL and a consistency assertion against lib/zstd.h
  • replaces the InstallSymlink.py install hooks with Meson's native install_symlink()
  • deletes the now-unused default-path helper scripts

The test-only build/meson/tests/valgrindTest.py remains unchanged, so Python is still only needed for that explicit test path.

Validation:

  • git diff --check HEAD~1..HEAD
  • default-path helper guard:
    rg -n "GetZstdLibraryVersion\\.py|InstallSymlink\\.py" build/meson/meson.build build/meson/programs/meson.build
    returned no matches
  • Meson 1.10.1 + Ninja 1.13.2:
    meson setup /tmp/zstd-meson-final-build build/meson --prefix=/tmp/zstd-meson-final-install -Dbin_tests=false -Dbin_contrib=false
    ninja -C /tmp/zstd-meson-final-build
    meson install -C /tmp/zstd-meson-final-build
  • Muon 0.5.0 with no python or python3 visible in PATH:
    muon-meson -C build/meson setup -Dprefix=/tmp/zstd-muon-final-install -Dbin_tests=false -Dbin_contrib=false /tmp/zstd-muon-final-build
    ninja -C /tmp/zstd-muon-final-build
    muon-meson -C /tmp/zstd-muon-final-build install
  • Samurai backend smoke on the Muon-generated build.ninja:
    samu -C /tmp/zstd-muon-final-build -t clean
    samu -C /tmp/zstd-muon-final-build
  • make -j2 zstd
  • zstd CLI compression/decompression round trip with cmp

The installed alias checks confirmed:

  • bin/zstdcat -> zstd
  • share/man/man1/zstdcat.1 -> zstd.1

@diizzyy

diizzyy commented Jul 13, 2026

Copy link
Copy Markdown

Can confirm that it's working, pthread seems to get lost during linking of the library but that's unrelated to this change. Thanks!

@Alb3e3
Alb3e3 marked this pull request as ready for review July 17, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants