Mercurial > hg > buttercup
changeset 52:b717de8b384f
py3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 07:51:52 -0800 |
parents | 59969aed59fb |
children | af4155b0a260 |
files | buttercup/buttercup.py buttercup/checkout.py buttercup/source.py |
diffstat | 3 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/buttercup/buttercup.py Tue Nov 03 07:33:01 2020 -0800 +++ b/buttercup/buttercup.py Tue Nov 03 07:51:52 2020 -0800 @@ -3,9 +3,8 @@ """ import os -import source from subprocess import check_call as call - +from . import source __all__ = ['Buttercup', 'SetupError']
--- a/buttercup/checkout.py Tue Nov 03 07:33:01 2020 -0800 +++ b/buttercup/checkout.py Tue Nov 03 07:51:52 2020 -0800 @@ -10,11 +10,13 @@ # pip install -r foo.txt import os -import source import sys -from buttercup import Buttercup + from optparse import OptionParser +from . import source +from .buttercup import Buttercup + def main(args=sys.argv[1:]): # parse command line options
--- a/buttercup/source.py Tue Nov 03 07:33:01 2020 -0800 +++ b/buttercup/source.py Tue Nov 03 07:51:52 2020 -0800 @@ -3,10 +3,8 @@ """ import os -try: - from subprocess import check_call as call -except ImportError: - from subprocess import call +from subprocess import check_call as call + class Source(object): """abstract base class for VCS source""" @@ -42,7 +40,7 @@ call(['hg', 'pull'], cwd=self.directory()) call(['hg', 'update'], cwd=self.directory()) except: - print 'Directory: %s' % self.directory() + print('Directory: %s' % self.directory()) raise else: if not os.path.exists(self.srcdir):