@@ -354,10 +354,17 @@ if __name__ == "__main__":
354354 If this is a directory, then the
355355 package will be created with the default filename {name}-{version}.pkg''' )
356356
357- parser .add_argument ('--clean' , dest = 'clean' , action = 'store_true' , help = "clean up temp files (default )" )
357+ parser .add_argument ('--clean' , dest = 'clean' , action = 'store_true' , help = "clean up temp files (DEFAULT )" )
358358 parser .add_argument ('--no-clean' , dest = 'clean' , action = 'store_false' , help = " do NOT clean up temp files" )
359359 parser .set_defaults (clean = True )
360360
361+ parser .add_argument ('--relocatable' , dest = 'relocatable' , action = 'store_true' ,
362+ help = "sets BundleIsRelocatable in the PackageInfo to true" )
363+ parser .add_argument ('--no-relocatable' , dest = 'relocatable' , action = 'store_false' ,
364+ help = "sets BundleIsRelocatable in the PackageInfo (DEFAULT is false)" )
365+ parser .set_defaults (relocatable = False )
366+ 367+ 361368 parser .add_argument ("-v" , "--verbosity" , action = "count" , default = 0 , help = "controls amount of logging output (max -vvv)" )
362369 parser .add_argument ('--version' , help = 'prints the version' , action = 'version' , version = quickpkg_version )
363370
@@ -457,6 +464,15 @@ if __name__ == "__main__":
457464 print result ["stderr" ]
458465 cleanup_and_exit (1 )
459466
467+ if not args .relocatable :
468+ # read and change component plist
469+ components = readPlist (component_plist )
470+ # component plist is an array of components
471+ for bundle in components :
472+ if "BundleIsRelocatable" in bundle .keys ():
473+ bundle ["BundleIsRelocatable" ] = False
474+ writePlist (components , component_plist )
475+ 460476 pkg_name = "{name}-{version}.pkg"
461477 if args .output :
462478 if os .path .isdir (args .output ):
0 commit comments