def process_develop_setup():
  """
  Clean up (if necessary) some directories before or after running
  setup in development (a.k.a. editable) mode (`pip install -e .`).
  """
  if 'develop' in sys.argv and os.path.exists('build'):
    # Remove `build` directory created by a regular installation
    shutil.rmtree('build')
  elif 'develop' not in sys.argv and os.path.exists('gfootball_engine'):
    # If `pip install .` is called after development mode,
    # remove the 'fonts' directory copied by a `develop` setup
    copied_fonts = 'third_party/gfootball_engine/fonts'
    if os.path.exists(copied_fonts):
      shutil.rmtree(copied_fonts)
    # Remove .so files (.pyd on Windows)
    for empty_lib in glob.glob("brainball_cpp_engine*"):
      os.remove(empty_lib)
    # Finally, remove symlink to the gfootball_engine directory
    if not os.path.exists('gfootball_engine'):
      return
    if os.path.islink('gfootball_engine'):
      if platform.system() == 'Windows':
        os.remove('gfootball_engine')
      else:
        os.unlink('gfootball_engine')
    else:
      shutil.rmtree('gfootball_engine')

  Clean up (if necessary) some directories before or after running
  setup in development (a.k.a. editable) mode (`pip install -e .`).
  
setup.py