Skip to content

wrap: Don't use patch.exe from Strawberry Perl #14795

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

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion mesonbuild/wrap/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,21 @@

ALL_TYPES = ['file', 'git', 'hg', 'svn', 'redirect']

PATCH = shutil.which('patch')
if mesonlib.is_windows():
from ..programs import ExternalProgram
from ..mesonlib import version_compare
_exclude_paths: T.List[str] = []
while True:
_patch = ExternalProgram('patch', silent=True, exclude_paths=_exclude_paths)
if not _patch.found():
break
if version_compare(_patch.get_version(), '>=2.6.1'):
break
_exclude_paths.append(os.path.dirname(_patch.get_path()))
PATCH = _patch.get_path() if _patch.found() else None
else:
PATCH = shutil.which('patch')


def whitelist_wrapdb(urlstr: str) -> urllib.parse.ParseResult:
""" raises WrapException if not whitelisted subdomain """
Expand Down
Loading