diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-12-10 21:00:26 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2023-12-10 21:00:26 +0100 |
commit | 715982bdf8b7c6bd6fb05221d82a0e1ab905336f (patch) | |
tree | 4e7adfdbe497908e2c19a7992816dd26f2edc751 /attoconf/lib | |
parent | 4e30c2ce14bb1cfbb0e3f87423db2c6f8d76f911 (diff) | |
download | attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.gz attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.bz2 attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.xz attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.zip |
Upgrade to Python3.
Mostly using 2to3 automatic converter with some educated guesses on my
part. Produces same TMWA Makefile as py2 attoconf. YMMV.
Diffstat (limited to 'attoconf/lib')
-rw-r--r-- | attoconf/lib/arches.py | 2 | ||||
-rw-r--r-- | attoconf/lib/c.py | 4 | ||||
-rw-r--r-- | attoconf/lib/config_hash.py | 6 | ||||
-rw-r--r-- | attoconf/lib/install.py | 2 | ||||
-rw-r--r-- | attoconf/lib/lex.py | 2 | ||||
-rw-r--r-- | attoconf/lib/make.py | 2 | ||||
-rw-r--r-- | attoconf/lib/pkg_config.py | 2 | ||||
-rw-r--r-- | attoconf/lib/templates.py | 2 | ||||
-rw-r--r-- | attoconf/lib/yacc.py | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/attoconf/lib/arches.py b/attoconf/lib/arches.py index 63f6244..67a84bd 100644 --- a/attoconf/lib/arches.py +++ b/attoconf/lib/arches.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + from ..classy import ClassyProject from ..types import triple, maybe diff --git a/attoconf/lib/c.py b/attoconf/lib/c.py index 03f77da..98d88df 100644 --- a/attoconf/lib/c.py +++ b/attoconf/lib/c.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import errno import os @@ -44,7 +44,7 @@ class TempFile: def __init__(self, filename, content): self.filename = filename if content is not None: - with open(filename, 'wx') as of: + with open(filename, 'x') as of: of.write(content) else: # TODO: raise OSError(errno.EEXIST) if file already exists diff --git a/attoconf/lib/config_hash.py b/attoconf/lib/config_hash.py index 81d4a68..b3cb423 100644 --- a/attoconf/lib/config_hash.py +++ b/attoconf/lib/config_hash.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + from hashlib import md5 import os @@ -25,8 +25,8 @@ from ..classy import ClassyProject def calc_hash(build): hash = md5() - for var, val in sorted(build.vars.iteritems()): - hash.update('%s = %s\n' % (var, val)) + for var, val in sorted(build.vars.items()): + hash.update(('%s = %s\n' % (var, val)).encode(encoding = 'UTF-8', errors = 'strict')) return hash.hexdigest() diff --git a/attoconf/lib/install.py b/attoconf/lib/install.py index 26e515c..04b5c5a 100644 --- a/attoconf/lib/install.py +++ b/attoconf/lib/install.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import os diff --git a/attoconf/lib/lex.py b/attoconf/lib/lex.py index 5f8ff43..27c2a7e 100644 --- a/attoconf/lib/lex.py +++ b/attoconf/lib/lex.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + from ..classy import ClassyProject from ..types import ShellList diff --git a/attoconf/lib/make.py b/attoconf/lib/make.py index f815cd0..ca70f34 100644 --- a/attoconf/lib/make.py +++ b/attoconf/lib/make.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import os import sys diff --git a/attoconf/lib/pkg_config.py b/attoconf/lib/pkg_config.py index 00bfba8..5bc846b 100644 --- a/attoconf/lib/pkg_config.py +++ b/attoconf/lib/pkg_config.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import os import sys diff --git a/attoconf/lib/templates.py b/attoconf/lib/templates.py index 0ec1a3e..7c26133 100644 --- a/attoconf/lib/templates.py +++ b/attoconf/lib/templates.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import os import sys diff --git a/attoconf/lib/yacc.py b/attoconf/lib/yacc.py index 885bbd3..c3fd1de 100644 --- a/attoconf/lib/yacc.py +++ b/attoconf/lib/yacc.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + from ..classy import ClassyProject from ..types import ShellList |