code: def build_software_cache(sw_dir=None):
      
      # ensure the cache is empty
      sw_dir = get_sw_dir(sw_dir)
      remove_software_cache(sw_dir)
      os.makedirs(sw_dir)
  
      # reload dependencies to find the proper module paths
      reload_dependencies(force=True)
  
      for mod in deps:
          path = os.path.dirname(mod.__file__)
          name, ext = os.path.splitext(os.path.basename(mod.__file__))
          # single file or module?
          if name == "__init__":
              # copy the entire module
              name = os.path.basename(path)
              shutil.copytree(path, os.path.join(sw_dir, name))
          else:
              shutil.copy2(os.path.join(path, name + ".py"), sw_dir)
docs: Builds up the software cache directory at *sw_dir* by simply copying all required python
      modules. *sw_dir* is evaluated with :py:func:`get_sw_dir`.