Changeset 6051

Show
Ignore:
Timestamp:
12/19/12 11:21:31 (6 years ago)
Author:
leonwlaw
Message:

Demokit + Base installers are built with pyreadline

Location:
seattle/trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/dist/build_demokit.py

    r5483 r6051  
    151151  # Put all demokit files into the tarball 
    152152  for fname in os.listdir(temp_demokit_dir): 
    153     demokit_tar.add(temp_demokit_dir + os.sep + fname, BASE_DEMOKIT_DIR + os.sep + fname, False) 
     153    demokit_tar.add(temp_demokit_dir + os.sep + fname, BASE_DEMOKIT_DIR + os.sep + fname, True) 
    154154 
    155155  demokit_tar.close() 
  • seattle/trunk/dist/demokit_files.fi

    r5483 r6051  
    133133req repyimporter.py 
    134134req LICENSE.txt, LICENSE.TXT 
     135req readline_windows.py 
     136req pyreadline 
    135137 
    136138 
  • seattle/trunk/dist/final_files.fi

    r5113 r6051  
    161161req centralizedadvertise_v2.repy 
    162162req udpcentralizedadvertise.repy 
     163req readline_windows.py 
     164req pyreadline 
    163165 
    164166# Files added during install build: 
  • seattle/trunk/dist/initial_files.fi

    r5113 r6051  
    160160req centralizedadvertise_v2.repy 
    161161req udpcentralizedadvertise.repy 
    162  
     162req readline_windows.py 
     163req pyreadline 
  • seattle/trunk/dist/make_base_installers.py

    r5620 r6051  
    417417  # Put all general program files into zipfile. 
    418418  for fname in gen_files: 
    419     installer_zipfile.write(temp_install_dir + os.sep + fname, 
     419    if os.path.isdir(temp_install_dir + os.sep + fname): 
     420      write_files_in_dir_to_zipfile(temp_install_dir + os.sep + fname,  
     421                            BASE_PROGRAM_FILES_DIR + os.sep + fname + os.sep,  
     422                            installer_zipfile) 
     423    else: 
     424      installer_zipfile.write(temp_install_dir + os.sep + fname, 
    420425                            BASE_PROGRAM_FILES_DIR + os.sep + fname) 
    421426 
     
    464469 
    465470 
     471def write_files_in_dir_to_zipfile(sourcepath, arcpath, zipfile): 
     472  ''' 
     473  <Purpose> 
     474    Inserts the files in the current directory into the specified zipfile. 
     475  <Arguments> 
     476    sourcepath: 
     477      The source path of the files to add. 
     478    arcpath: 
     479      The zip file's internal destination path to write to. 
     480    zipfile: 
     481      The zip file to write to. 
     482    files: 
     483      If specified, only these files are copied. Only files in the immediate 
     484      directory can be specified. 
     485    skipfiles: 
     486      If specified, these files will be skipped. Only files in the immediate  
     487      directory can be skipped. 
     488  <Side Effects> 
     489    Copies the files that are in sourcepath to arcpath in the zipfile. If files 
     490    is specified, then only those files are copied. 
     491  <Exceptions> 
     492    None 
     493  <Return> 
     494    None 
     495  ''' 
     496  files = os.listdir(sourcepath) 
     497 
     498  for fname in files: 
     499    sourcefilepath = sourcepath + os.sep + fname 
     500    targetfilepath = arcpath + os.sep + fname 
     501    if os.path.isfile(sourcefilepath): 
     502      zipfile.write(sourcefilepath, targetfilepath) 
     503    else: 
     504      write_files_in_dir_to_zipfile(sourcefilepath, targetfilepath, zipfile) 
    466505 
    467506def package_linux_or_mac(trunk_location, temp_install_dir, temp_tarball_dir, 
     
    503542  # Put all general installer files into the tar file. 
    504543  for fname in gen_files: 
    505     installer_tarfile.add(temp_install_dir + os.sep + fname, 
    506                           BASE_PROGRAM_FILES_DIR + os.sep + fname,False) 
     544    if fname not in ['pyreadline']: 
     545      installer_tarfile.add(temp_install_dir + os.sep + fname, 
     546                          BASE_PROGRAM_FILES_DIR + os.sep + fname,True) 
    507547 
    508548 
     
    588628  installer_zipfile = zipfile.ZipFile(temp_tarball_dir+os.sep+inst_name, "w", zipfile.ZIP_DEFLATED) 
    589629     
    590   # Put all general installer files into the zip file. 
     630  # Put all general program files into zipfile. 
    591631  for fname in gen_files: 
    592     installer_zipfile.write(temp_install_dir + os.sep + fname,BASE_PROGRAM_FILES_DIR + os.sep + fname) 
     632    if os.path.isdir(temp_install_dir + os.sep + fname): 
     633      if fname not in ['pyreadline']: 
     634        write_files_in_dir_to_zipfile(temp_install_dir + os.sep + fname,  
     635                            BASE_PROGRAM_FILES_DIR + os.sep + fname + os.sep,  
     636                            installer_zipfile) 
     637    else: 
     638      installer_zipfile.write(temp_install_dir + os.sep + fname, 
     639                            BASE_PROGRAM_FILES_DIR + os.sep + fname) 
    593640 
    594641 
  • seattle/trunk/preparetest.py

    r5637 r6051  
    193193  copy_to_target("seattlelib/*", target_dir) 
    194194  copy_to_target("seash/*", target_dir) 
     195  shutil.copytree("seash/pyreadline/", target_dir + os.sep + 'pyreadline/', ignore=shutil.ignore_patterns('*.pyc')) 
    195196  copy_to_target("softwareupdater/*", target_dir) 
    196197  copy_to_target("autograder/nm_remote_api.mix", target_dir)