Write wrap-redirect filename as posix path
This commit is contained in:
parent
c5c034525f
commit
0c91c474d3
|
@ -34,7 +34,7 @@ import json
|
||||||
|
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from netrc import netrc
|
from netrc import netrc
|
||||||
from pathlib import Path
|
from pathlib import Path, PurePath
|
||||||
|
|
||||||
from . import WrapMode
|
from . import WrapMode
|
||||||
from .. import coredata
|
from .. import coredata
|
||||||
|
@ -430,10 +430,10 @@ class Resolver:
|
||||||
# Write a dummy wrap file in main project that redirect to the
|
# Write a dummy wrap file in main project that redirect to the
|
||||||
# wrap we picked.
|
# wrap we picked.
|
||||||
with open(main_fname, 'w', encoding='utf-8') as f:
|
with open(main_fname, 'w', encoding='utf-8') as f:
|
||||||
f.write(textwrap.dedent('''\
|
f.write(textwrap.dedent(f'''\
|
||||||
[wrap-redirect]
|
[wrap-redirect]
|
||||||
filename = {}
|
filename = {PurePath(os.path.relpath(self.wrap.filename, self.subdir_root)).as_posix()}
|
||||||
'''.format(os.path.relpath(self.wrap.filename, self.subdir_root))))
|
'''))
|
||||||
else:
|
else:
|
||||||
# No wrap file, it's a dummy package definition for an existing
|
# No wrap file, it's a dummy package definition for an existing
|
||||||
# directory. Use the source code in place.
|
# directory. Use the source code in place.
|
||||||
|
|
Loading…
Reference in New Issue