Skip to content

Commit e3a8925

Browse files
committed
meson: windows: Normalize slashes in prefix
This fixes a build issue on windows, when the prefix is set to a path with forward slashes. Windows python defaults to a path with a backslash, but mingw ucrt python defaults to a forward slash. This in turn lead to a wrong PATH set during tests, causing tests to fail. Reported-by: Melih Mutlu <m.melihmutlu@gmail.com> Discussion: http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.de
1 parent 2beae72 commit e3a8925

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,15 +2733,15 @@ endif
27332733

27342734
prefix = get_option('prefix')
27352735

2736-
test_prefix = prefix
2736+
test_prefix = fs.as_posix(prefix)
27372737

27382738
if fs.is_absolute(get_option('prefix'))
27392739
if host_system == 'windows'
2740-
if prefix.split(':\\').length() == 1
2740+
if prefix.split(':/').length() == 1
27412741
# just a drive
27422742
test_prefix = ''
27432743
else
2744-
test_prefix = prefix.split(':\\')[1]
2744+
test_prefix = prefix.split(':/')[1]
27452745
endif
27462746
else
27472747
assert(prefix.startswith('/'))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy