@@ -4510,185 +4510,186 @@ def output_name(name, type_):
45104510 shared_lib_name = lambda name : output_name (name , SharedLibrary )
45114511 static_lib_name = lambda name : output_name (name , StaticLibrary )
45124512 exe_name = lambda name : output_name (name , Executable )
4513+ get_path = lambda f : Path (f ).as_posix ()
45134514
45144515 expected = {
45154516 'targets' : {
4516- f'{ self .builddir } /out1-notag.txt' : {
4517+ get_path ( f'{ self .builddir } /out1-notag.txt' ) : {
45174518 'destination' : '{datadir}/out1-notag.txt' ,
45184519 'tag' : None ,
45194520 'subproject' : None ,
45204521 },
4521- f'{ self .builddir } /out2-notag.txt' : {
4522+ get_path ( f'{ self .builddir } /out2-notag.txt' ) : {
45224523 'destination' : '{datadir}/out2-notag.txt' ,
45234524 'tag' : None ,
45244525 'subproject' : None ,
45254526 },
4526- f'{ self .builddir } /libstatic.a' : {
4527+ get_path ( f'{ self .builddir } /libstatic.a' ) : {
45274528 'destination' : '{libdir_static}/libstatic.a' ,
45284529 'tag' : 'devel' ,
45294530 'subproject' : None ,
45304531 },
4531- f '{ self .builddir } /' + exe_name ('app' ): {
4532+ get_path ( '{self.builddir}/' + exe_name ('app' ) ): {
45324533 'destination' : '{bindir}/' + exe_name ('app' ),
45334534 'tag' : 'runtime' ,
45344535 'subproject' : None ,
45354536 },
4536- f '{ self .builddir } /' + exe_name ('app-otherdir' ): {
4537+ get_path ( '{self.builddir}/' + exe_name ('app-otherdir' ) ): {
45374538 'destination' : '{prefix}/otherbin/' + exe_name ('app-otherdir' ),
45384539 'tag' : 'runtime' ,
45394540 'subproject' : None ,
45404541 },
4541- f '{ self .builddir } /subdir/' + exe_name ('app2' ): {
4542+ get_path ( '{self.builddir}/subdir/' + exe_name ('app2' ) ): {
45424543 'destination' : '{bindir}/' + exe_name ('app2' ),
45434544 'tag' : 'runtime' ,
45444545 'subproject' : None ,
45454546 },
4546- f '{ self .builddir } /' + shared_lib_name ('shared' ): {
4547+ get_path ( '{self.builddir}/' + shared_lib_name ('shared' ) ): {
45474548 'destination' : '{libdir_shared}/' + shared_lib_name ('shared' ),
45484549 'tag' : 'runtime' ,
45494550 'subproject' : None ,
45504551 },
4551- f '{ self .builddir } /' + shared_lib_name ('both' ): {
4552+ get_path ( '{self.builddir}/' + shared_lib_name ('both' ) ): {
45524553 'destination' : '{libdir_shared}/' + shared_lib_name ('both' ),
45534554 'tag' : 'runtime' ,
45544555 'subproject' : None ,
45554556 },
4556- f '{ self .builddir } /' + static_lib_name ('both' ): {
4557+ get_path ( '{self.builddir}/' + static_lib_name ('both' ) ): {
45574558 'destination' : '{libdir_static}/' + static_lib_name ('both' ),
45584559 'tag' : 'devel' ,
45594560 'subproject' : None ,
45604561 },
4561- f '{ self .builddir } /' + shared_lib_name ('bothcustom' ): {
4562+ get_path ( '{self.builddir}/' + shared_lib_name ('bothcustom' ) ): {
45624563 'destination' : '{libdir_shared}/' + shared_lib_name ('bothcustom' ),
45634564 'tag' : 'custom' ,
45644565 'subproject' : None ,
45654566 },
4566- f '{ self .builddir } /' + static_lib_name ('bothcustom' ): {
4567+ get_path ( '{self.builddir}/' + static_lib_name ('bothcustom' ) ): {
45674568 'destination' : '{libdir_static}/' + static_lib_name ('bothcustom' ),
45684569 'tag' : 'custom' ,
45694570 'subproject' : None ,
45704571 },
4571- f '{ self .builddir } /subdir/' + shared_lib_name ('both2' ): {
4572+ get_path ( '{self.builddir}/subdir/' + shared_lib_name ('both2' ) ): {
45724573 'destination' : '{libdir_shared}/' + shared_lib_name ('both2' ),
45734574 'tag' : 'runtime' ,
45744575 'subproject' : None ,
45754576 },
4576- f '{ self .builddir } /subdir/' + static_lib_name ('both2' ): {
4577+ get_path ( '{self.builddir}/subdir/' + static_lib_name ('both2' ) ): {
45774578 'destination' : '{libdir_static}/' + static_lib_name ('both2' ),
45784579 'tag' : 'devel' ,
45794580 'subproject' : None ,
45804581 },
4581- f '{ self .builddir } /out1-custom.txt' : {
4582+ get_path ( '{self.builddir}/out1-custom.txt' ) : {
45824583 'destination' : '{datadir}/out1-custom.txt' ,
45834584 'tag' : 'custom' ,
45844585 'subproject' : None ,
45854586 },
4586- f '{ self .builddir } /out2-custom.txt' : {
4587+ get_path ( '{self.builddir}/out2-custom.txt' ) : {
45874588 'destination' : '{datadir}/out2-custom.txt' ,
45884589 'tag' : 'custom' ,
45894590 'subproject' : None ,
45904591 },
4591- f '{ self .builddir } /out3-custom.txt' : {
4592+ get_path ( '{self.builddir}/out3-custom.txt' ) : {
45924593 'destination' : '{datadir}/out3-custom.txt' ,
45934594 'tag' : 'custom' ,
45944595 'subproject' : None ,
45954596 },
4596- f '{ self .builddir } /subdir/out1.txt' : {
4597+ get_path ( '{self.builddir}/subdir/out1.txt' ) : {
45974598 'destination' : '{datadir}/out1.txt' ,
45984599 'tag' : None ,
45994600 'subproject' : None ,
46004601 },
4601- f '{ self .builddir } /subdir/out2.txt' : {
4602+ get_path ( '{self.builddir}/subdir/out2.txt' ) : {
46024603 'destination' : '{datadir}/out2.txt' ,
46034604 'tag' : None ,
46044605 'subproject' : None ,
46054606 },
4606- f '{ self .builddir } /out-devel.h' : {
4607+ get_path ( '{self.builddir}/out-devel.h' ) : {
46074608 'destination' : '{includedir}/out-devel.h' ,
46084609 'tag' : 'devel' ,
46094610 'subproject' : None ,
46104611 },
4611- f '{ self .builddir } /out3-notag.txt' : {
4612+ get_path ( '{self.builddir}/out3-notag.txt' ) : {
46124613 'destination' : '{datadir}/out3-notag.txt' ,
46134614 'tag' : None ,
46144615 'subproject' : None ,
46154616 },
46164617 },
46174618 'configure' : {
4618- f '{ self .builddir } /foo-notag.h' : {
4619+ get_path ( '{self.builddir}/foo-notag.h' ) : {
46194620 'destination' : '{datadir}/foo-notag.h' ,
46204621 'tag' : None ,
46214622 'subproject' : None ,
46224623 },
4623- f '{ self .builddir } /foo2-devel.h' : {
4624+ get_path ( '{self.builddir}/foo2-devel.h' ) : {
46244625 'destination' : '{includedir}/foo2-devel.h' ,
46254626 'tag' : 'devel' ,
46264627 'subproject' : None ,
46274628 },
4628- f '{ self .builddir } /foo-custom.h' : {
4629+ get_path ( '{self.builddir}/foo-custom.h' ) : {
46294630 'destination' : '{datadir}/foo-custom.h' ,
46304631 'tag' : 'custom' ,
46314632 'subproject' : None ,
46324633 },
4633- f '{ self .builddir } /subdir/foo2.h' : {
4634+ get_path ( '{self.builddir}/subdir/foo2.h' ) : {
46344635 'destination' : '{datadir}/foo2.h' ,
46354636 'tag' : None ,
46364637 'subproject' : None ,
46374638 },
46384639 },
46394640 'data' : {
4640- f '{ testdir } /bar-notag.txt' : {
4641+ get_path ( '{testdir}/bar-notag.txt' ) : {
46414642 'destination' : '{datadir}/bar-notag.txt' ,
46424643 'tag' : None ,
46434644 'subproject' : None ,
46444645 },
4645- f '{ testdir } /bar-devel.h' : {
4646+ get_path ( '{testdir}/bar-devel.h' ) : {
46464647 'destination' : '{includedir}/bar-devel.h' ,
46474648 'tag' : 'devel' ,
46484649 'subproject' : None ,
46494650 },
4650- f '{ testdir } /bar-custom.txt' : {
4651+ get_path ( '{testdir}/bar-custom.txt' ) : {
46514652 'destination' : '{datadir}/bar-custom.txt' ,
46524653 'tag' : 'custom' ,
46534654 'subproject' : None ,
46544655 },
4655- f '{ testdir } /subdir/bar2-devel.h' : {
4656+ get_path ( '{testdir}/subdir/bar2-devel.h' ) : {
46564657 'destination' : '{includedir}/bar2-devel.h' ,
46574658 'tag' : 'devel' ,
46584659 'subproject' : None ,
46594660 },
4660- f '{ testdir } /subprojects/subproject/aaa.txt' : {
4661+ get_path ( '{testdir}/subprojects/subproject/aaa.txt' ) : {
46614662 'destination' : '{datadir}/subproject/aaa.txt' ,
46624663 'tag' : None ,
46634664 'subproject' : 'subproject' ,
46644665 },
4665- f '{ testdir } /subprojects/subproject/bbb.txt' : {
4666+ get_path ( '{testdir}/subprojects/subproject/bbb.txt' ) : {
46664667 'destination' : '{datadir}/subproject/bbb.txt' ,
46674668 'tag' : 'data' ,
46684669 'subproject' : 'subproject' ,
46694670 },
46704671 },
46714672 'headers' : {
4672- f '{ testdir } /foo1-devel.h' : {
4673+ get_path ( '{testdir}/foo1-devel.h' ) : {
46734674 'destination' : '{includedir}/foo1-devel.h' ,
46744675 'tag' : 'devel' ,
46754676 'subproject' : None ,
46764677 },
4677- f '{ testdir } /subdir/foo3-devel.h' : {
4678+ get_path ( '{testdir}/subdir/foo3-devel.h' ) : {
46784679 'destination' : '{includedir}/foo3-devel.h' ,
46794680 'tag' : 'devel' ,
46804681 'subproject' : None ,
46814682 },
46824683 },
46834684 'install_subdirs' : {
4684- f '{ testdir } /custom_files' : {
4685+ get_path ( '{testdir}/custom_files' ) : {
46854686 'destination' : '{datadir}/custom_files' ,
46864687 'tag' : 'custom' ,
46874688 'subproject' : None ,
46884689 'exclude_dirs' : [],
46894690 'exclude_files' : [],
46904691 },
4691- f '{ testdir } /excludes' : {
4692+ get_path ( '{testdir}/excludes' ) : {
46924693 'destination' : '{datadir}/excludes' ,
46934694 'tag' : 'custom' ,
46944695 'subproject' : None ,
@@ -4698,11 +4699,10 @@ def output_name(name, type_):
46984699 }
46994700 }
47004701
4701- fix_path = lambda path : os .path .sep .join (path .split ('/' ))
47024702 expected_fixed = {
47034703 data_type : {
4704- fix_path (source ): {
4705- key : fix_path (value ) if key == 'destination' else value
4704+ get_path (source ): {
4705+ key : get_path (value ) if key == 'destination' else value
47064706 for key , value in attributes .items ()
47074707 }
47084708 for source , attributes in files .items ()
0 commit comments