[glibmm/glibmm-2-64] tools/defs_gen/*.py: Specify that this is python3 code
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/glibmm-2-64] tools/defs_gen/*.py: Specify that this is python3 code
- Date: Thu, 21 May 2020 16:22:39 +0000 (UTC)
commit b5c531656d4a60e5bbb83ec1e0934191b91ce390
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Thu May 21 18:06:23 2020 +0200
tools/defs_gen/*.py: Specify that this is python3 code
Specify #!/usr/bin/env python3, making it unnecessary to have a python
command which is a link to python3.
In h2def.py, use the built-in set() instead of Set() from the sets module.
tools/defs_gen/docextract_to_xml.py | 2 +-
tools/defs_gen/h2def.py | 6 ++----
tools/defs_gen/scmexpr.py | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/tools/defs_gen/docextract_to_xml.py b/tools/defs_gen/docextract_to_xml.py
index 7c73cc0c..51e485fc 100755
--- a/tools/defs_gen/docextract_to_xml.py
+++ b/tools/defs_gen/docextract_to_xml.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- Mode: Python; py-indent-offset: 4 -*-
#
# This litte script outputs the C doc comments to an XML format.
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 9ca95d27..6417f17f 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- Mode: Python; py-indent-offset: 4 -*-
# GPL'ed
# Toby D. Reeves <toby max rl plh af mil>
@@ -73,8 +73,6 @@ import sys
import defsparser
-from sets import Set
-
# ------------------ Create typecodes from typenames ---------
_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])')
@@ -507,7 +505,7 @@ class DefsWriter:
def _define_func(self, buf):
buf = clean_func(buf)
buf = buf.split('\n')
- all_functions = Set()
+ all_functions = set()
filter = self._functions
for p in buf:
if not p:
diff --git a/tools/defs_gen/scmexpr.py b/tools/defs_gen/scmexpr.py
index d8055336..5898b3b7 100755
--- a/tools/defs_gen/scmexpr.py
+++ b/tools/defs_gen/scmexpr.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- Mode: Python; py-indent-offset: 4 -*-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]