aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
diff options
context:
space:
mode:
authorDenis Fortin <denis.fortin@vitec.com>2023-03-27 16:32:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2023-03-27 21:49:37 +0300
commit0c91c474d379e21a6c4f117aecd7178f6ff353dd (patch)
tree9bf2cf556f401f8c95e9a2b9f4502748ac211f6f /mesonbuild/wrap
parentc5c034525fc6493b068b760239179cf6ce6d71e4 (diff)
downloadmeson-0c91c474d379e21a6c4f117aecd7178f6ff353dd.zip
meson-0c91c474d379e21a6c4f117aecd7178f6ff353dd.tar.gz
meson-0c91c474d379e21a6c4f117aecd7178f6ff353dd.tar.bz2
Write wrap-redirect filename as posix path
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 3effc65..d1ed312 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -34,7 +34,7 @@ import json
from base64 import b64encode
from netrc import netrc
-from pathlib import Path
+from pathlib import Path, PurePath
from . import WrapMode
from .. import coredata
@@ -430,10 +430,10 @@ class Resolver:
# Write a dummy wrap file in main project that redirect to the
# wrap we picked.
with open(main_fname, 'w', encoding='utf-8') as f:
- f.write(textwrap.dedent('''\
+ f.write(textwrap.dedent(f'''\
[wrap-redirect]
- filename = {}
- '''.format(os.path.relpath(self.wrap.filename, self.subdir_root))))
+ filename = {PurePath(os.path.relpath(self.wrap.filename, self.subdir_root)).as_posix()}
+ '''))
else:
# No wrap file, it's a dummy package definition for an existing
# directory. Use the source code in place.