code: def get_gitpython_version():
      
      # if not in git clone, it doesn't matter
      if not in_git_clone():
          return 'GitPython'
  
      # otherwise, call out to get the git version
      try:
          gitv = subprocess.check_output('git --version', shell=True)
      except (OSError, IOError, subprocess.CalledProcessError):
          # no git installation, most likely
          git_version = '0.0.0'
      else:
          if isinstance(gitv, bytes):
              gitv = gitv.decode('utf-8')
          git_version = gitv.strip().split()[2]
  
      # if git>=2.15, we need GitPython>=2.1.8
      if LooseVersion(git_version) >= '2.15':
          return 'GitPython>=2.1.8'
      return 'GitPython'
docs: Determine the required version of GitPython
  
      Because of target systems running very, very old versions of setuptools,
      we only specify the actual version we need when we need it.