code: def get_source_name_and_version(source):
      
      if os.path.isfile(os.path.join(source, 'setup.py')):
          package_name, package_version = \
              _get_name_and_version_from_setup(source)
      # TODO: maybe we don't want to be that explicit and allow using >=
      # elif any(symbol in source for symbol in ['==', '>=', '<=']):
      elif '==' in source:
          base_name, package_version = source.split('==')
          package_name = _get_package_info_from_pypi(base_name)['name']
      else:
          package_info = _get_package_info_from_pypi(source)
          package_name = package_info['name']
          package_version = package_info['version']
      return package_name, package_version
docs: Retrieve the source package's name and version.
  
      If the source is a path, the name and version will be retrieved
      by querying the setup.py file in the path.
  
      If the source is PACKAGE_NAME==PACKAGE_VERSION, they will be used as
      the name and version.
  
      If the source is PACKAGE_NAME, the version will be extracted from
      the wheel of the latest version.