upload_docs_5.py 382 B

1234567891011121314
  1. def run(self):
  2. # Run sub commands
  3. for cmd_name in self.get_sub_commands():
  4. self.run_command(cmd_name)
  5. tmp_dir = tempfile.mkdtemp()
  6. name = self.distribution.metadata.get_name()
  7. zip_file = os.path.join(tmp_dir, "%s.zip" % name)
  8. try:
  9. self.create_zipfile(zip_file)
  10. self.upload_file(zip_file)
  11. finally:
  12. shutil.rmtree(tmp_dir)