# HG changeset patch # User Jeff Hammel # Date 1491008728 25200 # Node ID 407dd46857e1deb620cd2a9a40b8866a52044768 # Parent 43db853df1f8e5c6f9cb825770c5b381bec93fbd fix syntax error in python.py + version bump diff -r 43db853df1f8 -r 407dd46857e1 makeitso/makeitso.py --- a/makeitso/makeitso.py Fri Mar 31 17:53:48 2017 -0700 +++ b/makeitso/makeitso.py Fri Mar 31 18:05:28 2017 -0700 @@ -52,8 +52,8 @@ f, headers = urllib.urlretrive('%s/%s' % (url, filename)) content = file(f).read() outfile = os.path.join(globals()['tempdir'], subdir, filename) - o = file(outfile, 'w') - print >> o, content + with file(outfile, 'w') as o: + o.write(content) return globals()['tempdir'] tempita_files = ['__init__.py', '_looper.py', 'compat3.py'] @@ -84,6 +84,7 @@ def basename(uri): """return the basename of a URI""" + if '://' in uri: return uri.rsplit('/', 1)[1] else: @@ -530,7 +531,7 @@ # get templates from pkg_resources # (MakeItSo! and [TODO] pastescript templates) -# this should go last to ensure the module is wholly loaded [?] +# this should go last to ensure the module is wholly loaded [?!] def get_entry_points(): retval = {} try: diff -r 43db853df1f8 -r 407dd46857e1 makeitso/python.py --- a/makeitso/python.py Fri Mar 31 17:53:48 2017 -0700 +++ b/makeitso/python.py Fri Mar 31 18:05:28 2017 -0700 @@ -78,7 +78,8 @@ def post(self, variables, output): shutil.move(os.path.join(output, '{{main}}.py'), - os.path.join(output, '{}.py'.format(variables['main'])) + os.path.join(output, '{}.py'.format(variables['main']))) + class PythonPackageTemplate(PythonTemplate): """ diff -r 43db853df1f8 -r 407dd46857e1 setup.py --- a/setup.py Fri Mar 31 17:53:48 2017 -0700 +++ b/setup.py Fri Mar 31 18:05:28 2017 -0700 @@ -16,7 +16,7 @@ except IOError: description = '' -version = '0.4.3' +version = '0.4.4' setup(name='MakeItSo', version=version,