def update_requirements_main(args, base_path, top_level):
 options = UpdateRequirementsOptions()
 try:
  options.parseOptions(args)
 except UsageError as e:
  sys.stderr.write(u'{}\nUsage Error: {}: {}\n'.format(unicode(options), base_path.basename(), e).encode('utf-8'))
  raise SystemExit(1)
 requirements_directory = top_level.child('requirements')
 dockerfile = top_level.descendant(['admin', 'requirements.Dockerfile'])
 if (not options['no-build']):
  build_requirements_image(REQUIREMENTS_IMAGE, dockerfile, requirements_directory)
 for infile in requirements_directory.globChildren('*.in'):
  requirements_from_infile(infile)

def update_requirements_main ( args , base_path , top_level ) : options = UpdateRequirementsOptions ( ) try : options . parseOptions ( args ) except UsageError as e : sys . stderr . write ( u'{}\nUsage Error: {}: {}\n' . format ( unicode ( options ) , base_path . basename ( ) , e ) . encode ( 'utf-8' ) ) raise SystemExit ( 1 ) requirements_directory = top_level . child ( 'requirements' ) dockerfile = top_level . descendant ( [ 'admin' , 'requirements.Dockerfile' ] ) if ( not options [ 'no-build' ] ) : build_requirements_image ( REQUIREMENTS_IMAGE , dockerfile , requirements_directory ) for infile in requirements_directory . globChildren ( '*.in' ) : requirements_from_infile ( infile )
the main entry point for update-requirements .