From 0919bc38a96240396f7b7d3649417bc9a6fd0d7b Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 11:06:58 -0500 Subject: [PATCH 1/2] Update compyte --- pycuda/compyte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycuda/compyte b/pycuda/compyte index 4b6ab34f..d1f993da 160000 --- a/pycuda/compyte +++ b/pycuda/compyte @@ -1 +1 @@ -Subproject commit 4b6ab34f73948850577738df62ca6c8fbbae96c8 +Subproject commit d1f993daecc03947d9e6e3e60d2a5145ecbf3786 -- GitLab From a82f259abe5ec769833eb831bfad8377a5b5404c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 11:07:10 -0500 Subject: [PATCH 2/2] Update aksetup --- aksetup_helper.py | 7 +++++-- configure.py | 4 +--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aksetup_helper.py b/aksetup_helper.py index a168adf7..91e9ac0c 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -716,7 +716,9 @@ def substitute(substitutions, fname): string_var_re = re.compile(r"\$str\{([A-Za-z_0-9]+)\}") fname_in = fname+".in" - lines = open(fname_in, "r").readlines() + with open(fname_in, "r") as inf: + lines = inf.readlines() + new_lines = [] for line in lines: made_change = True @@ -746,7 +748,8 @@ def substitute(substitutions, fname): new_lines.insert(1, "# DO NOT EDIT THIS FILE -- " "it was generated by configure.py\n") new_lines.insert(2, "# %s\n" % (" ".join(sys.argv))) - open(fname, "w").write("".join(new_lines)) + with open(fname, "w") as outf: + outf.write("".join(new_lines)) from os import stat, chmod infile_stat_res = stat(fname_in) diff --git a/configure.py b/configure.py index 63edd4b9..85c9841d 100755 --- a/configure.py +++ b/configure.py @@ -1,6 +1,4 @@ -#! /usr/bin/env python - -from __future__ import absolute_import +#! /usr/bin/env python3 from aksetup_helper import configure_frontend configure_frontend() -- GitLab