()
return requirements, links
Extract the list of requirements from our requirements.txt.

    :rtype: 2-tuple
    :returns: Two lists, the first is a list of requirements in the form of
        pkgname==version. The second is a list of URIs or VCS checkout strings
        which specify the dependency links for obtaining a copy of the
        requirement.
Extract the list of requirements from our requirements.txt.
Extract the list of requirements from our requirements . txt .
def get_requirements():
    """Extract the list of requirements from our requirements.txt.

    :rtype: 2-tuple
    :returns: Two lists, the first is a list of requirements in the form of
        pkgname==version. The second is a list of URIs or VCS checkout strings
        which specify the dependency links for obtaining a copy of the
        requirement.
    """
    requirements_file = os.path.join(os.getcwd(), 'requirements.txt')
    requirements = []
    links=[]
    try:
        with open(requirements_file) as reqfile:
            for line in reqfile.readlines():
                line = line.strip()
                if line.startswith('#'):
                    continue
                elif line.startswith(
                        ('https://', 'git://', 'hg://', 'svn://')):
                    links.append(line)
                else:
                    requirements.append(line)

    except (IOError, OSError) as error:
        print(error)

    if python26():
        # Required to make `collections.OrderedDict` available on Python<=2.6
        requirements.append('ordereddict==1.1#a0ed854ee442051b249bfad0f638bbec')

    # Don't try to install psutil on PyPy:
    if _isPyPy:
        for line in requirements[:]:
            if line.startswith('psutil'):
                print("Not installing %s on PyPy..." % line)
                requirements.remove(line)

    return requirements, links
def get_requirements ( ) : requirements_file = os . path . join ( os . getcwd ( ) , 'requirements.txt' ) requirements = [ ] links = [ ] try : with open ( requirements_file ) as reqfile : for line in reqfile . readlines ( ) : line = line . strip ( ) if line . startswith ( '#' ) : continue elif line . startswith ( ( 'https://' , 'git://' , 'hg://' , 'svn://' ) ) : links . append ( line ) else : requirements . append ( line ) except ( IOError , OSError ) as error : print ( error ) if python26 ( ) : # Required to make `collections.OrderedDict` available on Python<=2.6 requirements . append ( 'ordereddict==1.1#a0ed854ee442051b249bfad0f638bbec' ) # Don't try to install psutil on PyPy: if _isPyPy : for line in requirements [ : ] : if line . startswith ( 'psutil' ) : print ( "Not installing %s on PyPy..." % line ) requirements . remove ( line ) return requirements , links