diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-01 06:10:49 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-01 06:10:49 -0500 |
commit | 0cb80a51ea2d64e2069d6ef9d3a42a0996b73c88 (patch) | |
tree | 8ec5023a9a5b949f7732e72490283f5d97620f2e /acprep | |
parent | cebc9f6e8649bcd5ff5f79aa479cf0d90562c18b (diff) | |
parent | 502fc9bda2b7ba5f7a3fbc5c944a6a93c3b97243 (diff) | |
download | fork-ledger-0cb80a51ea2d64e2069d6ef9d3a42a0996b73c88.tar.gz fork-ledger-0cb80a51ea2d64e2069d6ef9d3a42a0996b73c88.tar.bz2 fork-ledger-0cb80a51ea2d64e2069d6ef9d3a42a0996b73c88.zip |
Merge branch 'next'
Diffstat (limited to 'acprep')
-rwxr-xr-x | acprep | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -18,9 +18,13 @@ import shutil import string import sys import time -import hashlib import tempfile +try: + import hashlib +except: + import md5 + from os.path import * from stat import * from subprocess import Popen, PIPE, call @@ -580,18 +584,19 @@ class PrepareBuild(CommandLineApp): ] self.log.info('Executing: ' + string.join(packages, ' ')) self.execute(*packages) - elif exists('/etc/redhat-release'): + + if exists('/etc/redhat-release'): release = open('/etc/redhat-release') - if issue.readline().startswith('CentOS'): + if release.readline().startswith('CentOS'): self.log.info('Looks like you are using YUM on CentOS') packages = [ - 'sudo', 'yum', 'install', 'gcc', 'make', - 'libtool', 'autoconf', 'automake', - 'zlib-devel', 'bzip2-devel', 'python-devel', - 'bboost-devel', + 'sudo', 'yum', 'install', 'gcc', 'gcc-c++', + 'compat-gcc-*', 'make', 'libtool', 'autoconf', + 'automake', 'zlib-devel', 'bzip2-devel', + 'python-devel', 'bboost-devel', 'gmp-devel', 'gettext-devel', #'mpfr-devel' - #'libedit-dev', + 'libedit-devel', 'cppunit-devel', #'texlive-full', #'doxygen', 'graphviz', 'texinfo', @@ -623,7 +628,10 @@ class PrepareBuild(CommandLineApp): sys.exit(1) fd = open(tarball) - csum = hashlib.md5() + try: + csum = hashlib.md5() + except: + csum = md5.md5() csum.update(fd.read()) fd.close() digest = csum.hexdigest() |