#NEWLINE# def query_versions_pypi( self , package_name ) : #NEWLINE# #INDENT# 'Fetch list of available versions for a package from The CheeseShop' #NEWLINE# if ( not ( package_name in self . pkg_list ) ) : #NEWLINE# #INDENT# self . logger . debug ( ( 'Package %s not in cache, querying PyPI...' % package_name ) ) #NEWLINE# self . fetch_pkg_list ( ) #NEWLINE# #UNINDENT# versions = [ ] #NEWLINE# for pypi_pkg in self . pkg_list : #NEWLINE# #INDENT# if ( pypi_pkg . lower ( ) == package_name . lower ( ) ) : #NEWLINE# #INDENT# if self . debug : #NEWLINE# #INDENT# self . logger . debug ( ( 'DEBUG: %s' % package_name ) ) #NEWLINE# #UNINDENT# versions = self . package_releases ( pypi_pkg ) #NEWLINE# package_name = pypi_pkg #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# return ( package_name , versions )