You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 satır
322B

  1. import pip
  2. def install(package):
  3. pip.main(['install', package])
  4. def install_requirements(file):
  5. pip.main(['install', '-r', file, "--upgrade"])
  6. def check_dulwich():
  7. try:
  8. import dulwich
  9. return
  10. except ImportError:
  11. install('dulwich')
  12. raise ImportError("Unable to import dulwich")