@@ -4826,144 +4826,143 @@ def output_name(name, type_):
48264826        shared_lib_name  =  lambda  name : output_name (name , SharedLibrary )
48274827        static_lib_name  =  lambda  name : output_name (name , StaticLibrary )
48284828        exe_name  =  lambda  name : output_name (name , Executable )
4829-         get_path  =  lambda  f : Path (f ).as_posix ()
48304829
48314830        expected  =  {
48324831            'targets' : {
4833-                 get_path ( f'{ self .builddir }  /out1-notag.txt' ) : {
4832+                 f'{ self .builddir }  /out1-notag.txt' : {
48344833                    'build_rpaths' : [],
48354834                    'destination' : '{datadir}/out1-notag.txt' ,
48364835                    'install_rpath' : None ,
48374836                    'tag' : None ,
48384837                    'subproject' : None ,
48394838                },
4840-                 get_path ( f'{ self .builddir }  /out2-notag.txt' ) : {
4839+                 f'{ self .builddir }  /out2-notag.txt' : {
48414840                    'build_rpaths' : [],
48424841                    'destination' : '{datadir}/out2-notag.txt' ,
48434842                    'install_rpath' : None ,
48444843                    'tag' : None ,
48454844                    'subproject' : None ,
48464845                },
4847-                 get_path ( f'{ self .builddir }  /libstatic.a' ) : {
4846+                 f'{ self .builddir }  /libstatic.a' : {
48484847                    'build_rpaths' : [],
48494848                    'destination' : '{libdir_static}/libstatic.a' ,
48504849                    'install_rpath' : None ,
48514850                    'tag' : 'devel' ,
48524851                    'subproject' : None ,
48534852                },
4854-                 get_path ( f'{ self .builddir }  /'  +  exe_name ('app' ) ): {
4853+                 f'{ self .builddir }  /'  +  exe_name ('app' ): {
48554854                    'build_rpaths' : [],
48564855                    'destination' : '{bindir}/'  +  exe_name ('app' ),
48574856                    'install_rpath' : None ,
48584857                    'tag' : 'runtime' ,
48594858                    'subproject' : None ,
48604859                },
4861-                 get_path ( f'{ self .builddir }  /'  +  exe_name ('app-otherdir' ) ): {
4860+                 f'{ self .builddir }  /'  +  exe_name ('app-otherdir' ): {
48624861                    'build_rpaths' : [],
48634862                    'destination' : '{prefix}/otherbin/'  +  exe_name ('app-otherdir' ),
48644863                    'install_rpath' : None ,
48654864                    'tag' : 'runtime' ,
48664865                    'subproject' : None ,
48674866                },
4868-                 get_path ( f'{ self .builddir }  /subdir/'  +  exe_name ('app2' ) ): {
4867+                 f'{ self .builddir }  /subdir/'  +  exe_name ('app2' ): {
48694868                    'build_rpaths' : [],
48704869                    'destination' : '{bindir}/'  +  exe_name ('app2' ),
48714870                    'install_rpath' : None ,
48724871                    'tag' : 'runtime' ,
48734872                    'subproject' : None ,
48744873                },
4875-                 get_path ( f'{ self .builddir }  /'  +  shared_lib_name ('shared' ) ): {
4874+                 f'{ self .builddir }  /'  +  shared_lib_name ('shared' ): {
48764875                    'build_rpaths' : [],
48774876                    'destination' : '{libdir_shared}/'  +  shared_lib_name ('shared' ),
48784877                    'install_rpath' : None ,
48794878                    'tag' : 'runtime' ,
48804879                    'subproject' : None ,
48814880                },
4882-                 get_path ( f'{ self .builddir }  /'  +  shared_lib_name ('both' ) ): {
4881+                 f'{ self .builddir }  /'  +  shared_lib_name ('both' ): {
48834882                    'build_rpaths' : [],
48844883                    'destination' : '{libdir_shared}/'  +  shared_lib_name ('both' ),
48854884                    'install_rpath' : None ,
48864885                    'tag' : 'runtime' ,
48874886                    'subproject' : None ,
48884887                },
4889-                 get_path ( f'{ self .builddir }  /'  +  static_lib_name ('both' ) ): {
4888+                 f'{ self .builddir }  /'  +  static_lib_name ('both' ): {
48904889                    'build_rpaths' : [],
48914890                    'destination' : '{libdir_static}/'  +  static_lib_name ('both' ),
48924891                    'install_rpath' : None ,
48934892                    'tag' : 'devel' ,
48944893                    'subproject' : None ,
48954894                },
4896-                 get_path ( f'{ self .builddir }  /'  +  shared_lib_name ('bothcustom' ) ): {
4895+                 f'{ self .builddir }  /'  +  shared_lib_name ('bothcustom' ): {
48974896                    'build_rpaths' : [],
48984897                    'destination' : '{libdir_shared}/'  +  shared_lib_name ('bothcustom' ),
48994898                    'install_rpath' : None ,
49004899                    'tag' : 'custom' ,
49014900                    'subproject' : None ,
49024901                },
4903-                 get_path ( f'{ self .builddir }  /'  +  static_lib_name ('bothcustom' ) ): {
4902+                 f'{ self .builddir }  /'  +  static_lib_name ('bothcustom' ): {
49044903                    'build_rpaths' : [],
49054904                    'destination' : '{libdir_static}/'  +  static_lib_name ('bothcustom' ),
49064905                    'install_rpath' : None ,
49074906                    'tag' : 'custom' ,
49084907                    'subproject' : None ,
49094908                },
4910-                 get_path ( f'{ self .builddir }  /subdir/'  +  shared_lib_name ('both2' ) ): {
4909+                 f'{ self .builddir }  /subdir/'  +  shared_lib_name ('both2' ): {
49114910                    'build_rpaths' : [],
49124911                    'destination' : '{libdir_shared}/'  +  shared_lib_name ('both2' ),
49134912                    'install_rpath' : None ,
49144913                    'tag' : 'runtime' ,
49154914                    'subproject' : None ,
49164915                },
4917-                 get_path ( f'{ self .builddir }  /subdir/'  +  static_lib_name ('both2' ) ): {
4916+                 f'{ self .builddir }  /subdir/'  +  static_lib_name ('both2' ): {
49184917                    'build_rpaths' : [],
49194918                    'destination' : '{libdir_static}/'  +  static_lib_name ('both2' ),
49204919                    'install_rpath' : None ,
49214920                    'tag' : 'devel' ,
49224921                    'subproject' : None ,
49234922                },
4924-                 get_path ( f'{ self .builddir }  /out1-custom.txt' ) : {
4923+                 f'{ self .builddir }  /out1-custom.txt' : {
49254924                    'build_rpaths' : [],
49264925                    'destination' : '{datadir}/out1-custom.txt' ,
49274926                    'install_rpath' : None ,
49284927                    'tag' : 'custom' ,
49294928                    'subproject' : None ,
49304929                },
4931-                 get_path ( f'{ self .builddir }  /out2-custom.txt' ) : {
4930+                 f'{ self .builddir }  /out2-custom.txt' : {
49324931                    'build_rpaths' : [],
49334932                    'destination' : '{datadir}/out2-custom.txt' ,
49344933                    'install_rpath' : None ,
49354934                    'tag' : 'custom' ,
49364935                    'subproject' : None ,
49374936                },
4938-                 get_path ( f'{ self .builddir }  /out3-custom.txt' ) : {
4937+                 f'{ self .builddir }  /out3-custom.txt' : {
49394938                    'build_rpaths' : [],
49404939                    'destination' : '{datadir}/out3-custom.txt' ,
49414940                    'install_rpath' : None ,
49424941                    'tag' : 'custom' ,
49434942                    'subproject' : None ,
49444943                },
4945-                 get_path ( f'{ self .builddir }  /subdir/out1.txt' ) : {
4944+                 f'{ self .builddir }  /subdir/out1.txt' : {
49464945                    'build_rpaths' : [],
49474946                    'destination' : '{datadir}/out1.txt' ,
49484947                    'install_rpath' : None ,
49494948                    'tag' : None ,
49504949                    'subproject' : None ,
49514950                },
4952-                 get_path ( f'{ self .builddir }  /subdir/out2.txt' ) : {
4951+                 f'{ self .builddir }  /subdir/out2.txt' : {
49534952                    'build_rpaths' : [],
49544953                    'destination' : '{datadir}/out2.txt' ,
49554954                    'install_rpath' : None ,
49564955                    'tag' : None ,
49574956                    'subproject' : None ,
49584957                },
4959-                 get_path ( f'{ self .builddir }  /out-devel.h' ) : {
4958+                 f'{ self .builddir }  /out-devel.h' : {
49604959                    'build_rpaths' : [],
49614960                    'destination' : '{includedir}/out-devel.h' ,
49624961                    'install_rpath' : None ,
49634962                    'tag' : 'devel' ,
49644963                    'subproject' : None ,
49654964                },
4966-                 get_path ( f'{ self .builddir }  /out3-notag.txt' ) : {
4965+                 f'{ self .builddir }  /out3-notag.txt' : {
49674966                    'build_rpaths' : [],
49684967                    'destination' : '{datadir}/out3-notag.txt' ,
49694968                    'install_rpath' : None ,
@@ -4972,80 +4971,80 @@ def output_name(name, type_):
49724971                },
49734972            },
49744973            'configure' : {
4975-                 get_path ( f'{ self .builddir }  /foo-notag.h' ) : {
4974+                 f'{ self .builddir }  /foo-notag.h' : {
49764975                    'destination' : '{datadir}/foo-notag.h' ,
49774976                    'tag' : None ,
49784977                    'subproject' : None ,
49794978                },
4980-                 get_path ( f'{ self .builddir }  /foo2-devel.h' ) : {
4979+                 f'{ self .builddir }  /foo2-devel.h' : {
49814980                    'destination' : '{includedir}/foo2-devel.h' ,
49824981                    'tag' : 'devel' ,
49834982                    'subproject' : None ,
49844983                },
4985-                 get_path ( f'{ self .builddir }  /foo-custom.h' ) : {
4984+                 f'{ self .builddir }  /foo-custom.h' : {
49864985                    'destination' : '{datadir}/foo-custom.h' ,
49874986                    'tag' : 'custom' ,
49884987                    'subproject' : None ,
49894988                },
4990-                 get_path ( f'{ self .builddir }  /subdir/foo2.h' ) : {
4989+                 f'{ self .builddir }  /subdir/foo2.h' : {
49914990                    'destination' : '{datadir}/foo2.h' ,
49924991                    'tag' : None ,
49934992                    'subproject' : None ,
49944993                },
49954994            },
49964995            'data' : {
4997-                 get_path ( f'{ testdir }  /bar-notag.txt' ) : {
4996+                 f'{ testdir }  /bar-notag.txt' : {
49984997                    'destination' : '{datadir}/bar-notag.txt' ,
49994998                    'tag' : None ,
50004999                    'subproject' : None ,
50015000                },
5002-                 get_path ( f'{ testdir }  /bar-devel.h' ) : {
5001+                 f'{ testdir }  /bar-devel.h' : {
50035002                    'destination' : '{includedir}/bar-devel.h' ,
50045003                    'tag' : 'devel' ,
50055004                    'subproject' : None ,
50065005                },
5007-                 get_path ( f'{ testdir }  /bar-custom.txt' ) : {
5006+                 f'{ testdir }  /bar-custom.txt' : {
50085007                    'destination' : '{datadir}/bar-custom.txt' ,
50095008                    'tag' : 'custom' ,
50105009                    'subproject' : None ,
50115010                },
5012-                 get_path ( f'{ testdir }  /subdir/bar2-devel.h' ) : {
5011+                 f'{ testdir }  /subdir/bar2-devel.h' : {
50135012                    'destination' : '{includedir}/bar2-devel.h' ,
50145013                    'tag' : 'devel' ,
50155014                    'subproject' : None ,
50165015                },
5017-                 get_path ( f'{ testdir }  /subprojects/subproject/aaa.txt' ) : {
5016+                 f'{ testdir }  /subprojects/subproject/aaa.txt' : {
50185017                    'destination' : '{datadir}/subproject/aaa.txt' ,
50195018                    'tag' : None ,
50205019                    'subproject' : 'subproject' ,
50215020                },
5022-                 get_path ( f'{ testdir }  /subprojects/subproject/bbb.txt' ) : {
5021+                 f'{ testdir }  /subprojects/subproject/bbb.txt' : {
50235022                    'destination' : '{datadir}/subproject/bbb.txt' ,
50245023                    'tag' : 'data' ,
50255024                    'subproject' : 'subproject' ,
50265025                },
50275026            },
50285027            'headers' : {
5029-                 get_path ( f'{ testdir }  /foo1-devel.h' ) : {
5028+                 f'{ testdir }  /foo1-devel.h' : {
50305029                    'destination' : '{includedir}/foo1-devel.h' ,
50315030                    'tag' : 'devel' ,
50325031                    'subproject' : None ,
50335032                },
5034-                 get_path ( f'{ testdir }  /subdir/foo3-devel.h' ) : {
5033+                 f'{ testdir }  /subdir/foo3-devel.h' : {
50355034                    'destination' : '{includedir}/foo3-devel.h' ,
50365035                    'tag' : 'devel' ,
50375036                    'subproject' : None ,
50385037                },
50395038            },
50405039            'install_subdirs' : {
5041-                 get_path ( f'{ testdir }  /custom_files' ) : {
5040+                 f'{ testdir }  /custom_files' : {
50425041                    'destination' : '{datadir}/custom_files' ,
50435042                    'tag' : 'custom' ,
50445043                    'subproject' : None ,
50455044                    'exclude_dirs' : [],
50465045                    'exclude_files' : [],
50475046                },
5048-                 get_path ( f'{ testdir }  /excludes' ) : {
5047+                 f'{ testdir }  /excludes' : {
50495048                    'destination' : '{datadir}/excludes' ,
50505049                    'tag' : 'custom' ,
50515050                    'subproject' : None ,
@@ -5055,10 +5054,11 @@ def output_name(name, type_):
50555054            }
50565055        }
50575056
5057+         fix_path  =  lambda  path : os .path .sep .join (path .split ('/' ))
50585058        expected_fixed  =  {
50595059            data_type : {
5060-                 get_path (source ): {
5061-                     key : get_path (value ) if  key  ==  'destination'  else  value 
5060+                 fix_path (source ): {
5061+                     key : fix_path (value ) if  key  ==  'destination'  else  value 
50625062                    for  key , value  in  attributes .items ()
50635063                }
50645064                for  source , attributes  in  files .items ()
@@ -5069,7 +5069,6 @@ def output_name(name, type_):
50695069        for  data_type , files  in  expected_fixed .items ():
50705070            for  file , details  in  files .items ():
50715071                with  self .subTest (key = '{}.{}' .format (data_type , file )):
5072-                     if  data_type  ==  'data' : print (res [data_type ])
50735072                    self .assertEqual (res [data_type ][file ], details )
50745073
50755074    @skip_if_not_language ('rust' ) 
0 commit comments