summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2020-05-21 18:06:23 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2020-05-21 18:15:55 +0200
commitb5c531656d4a60e5bbb83ec1e0934191b91ce390 (patch)
treede49e8aa187f9d3a3e0aa3d89093fda0efd3264a
parentf64e9cf198391d657b4516fca6e482141c86c461 (diff)
downloadglibmm-b5c531656d4a60e5bbb83ec1e0934191b91ce390.tar.gz
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.
-rwxr-xr-xtools/defs_gen/docextract_to_xml.py2
-rwxr-xr-xtools/defs_gen/h2def.py6
-rwxr-xr-xtools/defs_gen/scmexpr.py2
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 -*-