code: def stage(self):
          
  
          if 'PYPI_USER' not in os.environ or 'PYPI_PASS' not in os.environ:
              raise BuildError("You must set the PYPI_USER and PYPI_PASS environment variables")
  
          try:
              import twine
          except ImportError:
              raise BuildError("You must install twine in order to release python packages",
                               suggestion="pip install twine")
  
          if not self.component.has_wheel:
              raise BuildError("You can't release a component to a PYPI repository if it doesn't have python packages")
  
          # Make sure we have built distributions ready to upload
          wheel = self.component.support_wheel
          sdist = "%s-%s.tar.gz" % (self.component.support_distribution, self.component.parsed_version.pep440_string())
  
          wheel_path = os.path.realpath(os.path.abspath(os.path.join(self.component.output_folder, 'python', wheel)))
          sdist_path = os.path.realpath(os.path.abspath(os.path.join(self.component.output_folder, 'python', sdist)))
  
          if not os.path.isfile(wheel_path) or not os.path.isfile(sdist_path):
              raise BuildError("Could not find built wheel or sdist matching current built version",
                               sdist_path=sdist_path, wheel_path=wheel_path)
  
          self.dists = [sdist_path, wheel_path]
docs: Stage python packages for release, verifying everything we can about them.