upload.py 462 B

1234567891011121314151617
  1. from distutils import log
  2. from distutils.command import upload as orig
  3. from setuptools.errors import RemovedCommandError
  4. class upload(orig.upload):
  5. """Formerly used to upload packages to PyPI."""
  6. def run(self):
  7. msg = (
  8. "The upload command has been removed, use twine to upload "
  9. + "instead (https://pypi.org/p/twine)"
  10. )
  11. self.announce("ERROR: " + msg, log.ERROR)
  12. raise RemovedCommandError(msg)