| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Please keep this code python 2.4 compatible and stand alone. | 3 # Please keep this code python 2.4 compatible and stand alone. |
| 4 | 4 |
| 5 import logging, os, shutil, sys, tempfile, time, urllib2 | 5 import logging, os, shutil, sys, tempfile, time, urllib2 |
| 6 import subprocess, re | 6 import subprocess, re |
| 7 from autotest_lib.client.common_lib import utils | 7 from autotest_lib.client.common_lib import utils |
| 8 | 8 |
| 9 _READ_SIZE = 64*1024 | 9 _READ_SIZE = 64*1024 |
| 10 _MAX_PACKAGE_SIZE = 100*1024*1024 | 10 _MAX_PACKAGE_SIZE = 100*1024*1024 |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 hex_sum = '5baa64c73e966b57fa797040585c760c502dc70b' | 606 hex_sum = '5baa64c73e966b57fa797040585c760c502dc70b' |
| 607 | 607 |
| 608 _build_and_install = ExternalPackage._build_and_install_from_package | 608 _build_and_install = ExternalPackage._build_and_install_from_package |
| 609 _build_and_install_current_dir = ( | 609 _build_and_install_current_dir = ( |
| 610 ExternalPackage._build_and_install_current_dir_noegg) | 610 ExternalPackage._build_and_install_current_dir_noegg) |
| 611 | 611 |
| 612 | 612 |
| 613 class ParamikoPackage(ExternalPackage): | 613 class ParamikoPackage(ExternalPackage): |
| 614 version = '1.7.5' | 614 version = '1.7.5' |
| 615 local_filename = 'paramiko-%s.tar.gz' % version | 615 local_filename = 'paramiko-%s.tar.gz' % version |
| 616 urls = ('http://www.lag.net/paramiko/download/' + local_filename,) | 616 urls = ('http://www.lag.net/paramiko/download/' + local_filename, |
| 617 'ftp://mirrors.kernel.org/gentoo/distfiles/' + local_filename,) |
| 617 hex_sum = '592be7a08290070b71da63a8e6f28a803399e5c5' | 618 hex_sum = '592be7a08290070b71da63a8e6f28a803399e5c5' |
| 618 | 619 |
| 619 | 620 |
| 620 _build_and_install = ExternalPackage._build_and_install_from_package | 621 _build_and_install = ExternalPackage._build_and_install_from_package |
| 621 | 622 |
| 622 | 623 |
| 623 def _check_for_pycrypto(self): | 624 def _check_for_pycrypto(self): |
| 624 # NOTE(gps): Linux distros have better python-crypto packages than we | 625 # NOTE(gps): Linux distros have better python-crypto packages than we |
| 625 # can easily get today via a wget due to the library's age and staleness | 626 # can easily get today via a wget due to the library's age and staleness |
| 626 # yet many security and behavior bugs are fixed by patches that distros | 627 # yet many security and behavior bugs are fixed by patches that distros |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 symlink_path = os.path.join( | 745 symlink_path = os.path.join( |
| 745 install_dir, GwtPackage.name, self.symlink_name) | 746 install_dir, GwtPackage.name, self.symlink_name) |
| 746 if os.path.exists(symlink_path): | 747 if os.path.exists(symlink_path): |
| 747 os.remove(symlink_path) | 748 os.remove(symlink_path) |
| 748 os.symlink(dest, symlink_path) | 749 os.symlink(dest, symlink_path) |
| 749 return True | 750 return True |
| 750 | 751 |
| 751 | 752 |
| 752 if __name__ == '__main__': | 753 if __name__ == '__main__': |
| 753 sys.exit(main()) | 754 sys.exit(main()) |
| OLD | NEW |