def get_pip_requirements(fname=os.path.join(jasperpath.LIB_PATH, 'requirements.txt')):
 logger = logging.getLogger(__name__)
 if os.access(fname, os.R_OK):
  reqs = list(pip.req.parse_requirements(fname))
  logger.debug("Found %d PIP requirements in file '%s'", len(reqs), fname)
  return reqs
 else:
  logger.debug("PIP requirements file '%s' not found or not readable", fname)

def get_pip_requirements ( fname = os . path . join ( jasperpath . LIB_PATH , 'requirements.txt' ) ) : logger = logging . getLogger ( __name__ ) if os . access ( fname , os . R_OK ) : reqs = list ( pip . req . parse_requirements ( fname ) ) logger . debug ( "Found %d PIP requirements in file '%s'" , len ( reqs ) , fname ) return reqs else : logger . debug ( "PIP requirements file '%s' not found or not readable" , fname )
gets the pip requirements from a text file .