pypush_file.py 586 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # VARS = year
  4. pypush_file_string = """
  5. #!/bin/sh
  6. # Scriptacular - pypush.sh
  7. # Create a Python source distribution and push it to PyPI
  8. # Copyright {{year}} Christopher Simpkins
  9. # MIT License
  10. # Build and push to PyPI
  11. python setup.py sdist upload
  12. # Confirm that it worked
  13. if (( $? )); then
  14. echo "Unable to distribute your release to PyPI" >&2
  15. exit 1
  16. fi
  17. python setup.py bdist_wheel upload
  18. # Confirm that wheel distribution worked
  19. if (( $? )); then
  20. echo "Unable to distribute your wheel to PyPI" >&2
  21. exit 1
  22. fi
  23. # Exit success
  24. exit 0
  25. """