code: def get_install_requires():
      
      requirements = []
      for line in open('requirements.txt').readlines():
          # skip to next iteration if comment or empty line
          if line.startswith('#') or line == '' or line.startswith('http') or line.startswith('git'):
              continue
          # add line to requirements
          requirements.append(line.replace('\n', ''))
      # add py2-ipaddress if python2
      if sys.version_info.major < 3:
          requirements.append('py2-ipaddress')
      return requirements
docs: parse requirements.txt, ignore links, exclude comments