# HG changeset patch # User Jeff Hammel # Date 1604418712 28800 # Node ID b717de8b384f656eed9d832e38a059458c99cd37 # Parent 59969aed59fbe476a8e5ee95c54cb5f1cd98d76a py3 diff -r 59969aed59fb -r b717de8b384f buttercup/buttercup.py --- 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'] diff -r 59969aed59fb -r b717de8b384f buttercup/checkout.py --- 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 diff -r 59969aed59fb -r b717de8b384f buttercup/source.py --- 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):