Skip to content

Commit

Permalink
Write wrap-redirect filename as posix path
Browse files Browse the repository at this point in the history
  • Loading branch information
DFOVIT committed Mar 27, 2023
1 parent 023a0db commit 48fe479
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mesonbuild/wrap/wrap.py
Expand Up @@ -34,7 +34,7 @@

from base64 import b64encode
from netrc import netrc
from pathlib import Path
from pathlib import Path, PurePath

from . import WrapMode
from .. import coredata
Expand Down Expand Up @@ -430,10 +430,10 @@ def resolve(self, packagename: str, method: str) -> str:
# 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.
Expand Down

0 comments on commit 48fe479

Please sign in to comment.