@@ -354,10 +354,17 @@ if __name__ == "__main__":
354
354
If this is a directory, then the
355
355
package will be created with the default filename {name}-{version}.pkg''' )
356
356
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 )" )
358
358
parser .add_argument ('--no-clean' , dest = 'clean' , action = 'store_false' , help = " do NOT clean up temp files" )
359
359
parser .set_defaults (clean = True )
360
360
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
+
361
368
parser .add_argument ("-v" , "--verbosity" , action = "count" , default = 0 , help = "controls amount of logging output (max -vvv)" )
362
369
parser .add_argument ('--version' , help = 'prints the version' , action = 'version' , version = quickpkg_version )
363
370
@@ -457,6 +464,15 @@ if __name__ == "__main__":
457
464
print result ["stderr" ]
458
465
cleanup_and_exit (1 )
459
466
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
+
460
476
pkg_name = "{name}-{version}.pkg"
461
477
if args .output :
462
478
if os .path .isdir (args .output ):
0 commit comments