pkg.py 476 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. # DT Home
  3. # Package
  4. #
  5. # Douglas Thrift
  6. #
  7. # pkg.py
  8. import pip
  9. import platform
  10. pkg = lambda args: sys.exit(pip.main(args))
  11. # Only use PyPM on 32bit ActivePython since 64bit requires a Business License
  12. if platform.system() == 'Windows' and platform.machine() == 'x86':
  13. try:
  14. import pypm
  15. pkg = lambda args: pypm.cmd(['-g'] + args)
  16. except ImportError:
  17. pass
  18. if __name__ == '__main__':
  19. import sys
  20. pkg(sys.argv[1:])