code: def upload_component(component):
      
  
      if 'PYPI_USER' in os.environ and 'PYPI_PASS' in os.environ:
          pypi_user = os.environ['PYPI_USER']
          pypi_pass = os.environ['PYPI_PASS']
      else:
          pypi_user = None
          pypi_pass = None
          print("No PYPI user information in environment")
  
      comp = comp_names[component]
      distpath = os.path.join(comp.path, 'dist', '*')
      distpath = os.path.realpath(os.path.abspath(distpath))
      dists = glob.glob(distpath)
  
      if pypi_user is None:
          args = ['twine', 'upload', distpath]
      else:
          args = ['twine', 'upload', '-u', pypi_user, '-p', pypi_pass, distpath]
  
      # Invoke upload this way since subprocess call of twine cli has cross platform issues
      upload(dists, 'pypi', False, None, pypi_user, pypi_pass, None, None, '~/.pypirc', False, None, None, None)
docs: Upload a given component to pypi
  
      The pypi username and password must either be specified in a ~/.pypirc
      file or in environment variables PYPI_USER and PYPI_PASS