Skip to content

Commit

Permalink
Convert oi-userland tools to Python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pyhalov committed Aug 8, 2019
1 parent 8a5e2e4 commit fb10bab
Show file tree
Hide file tree
Showing 10 changed files with 693 additions and 696 deletions.
2 changes: 1 addition & 1 deletion make-rules/history.mk
Expand Up @@ -30,7 +30,7 @@
COMPONENT_SRC=nonexistent COMPONENT_SRC=nonexistent


PKGSEND = /usr/bin/pkgsend PKGSEND = /usr/bin/pkgsend
PKGLINT = /usr/bin/pkglint PKGLINT = /usr/bin/python3.5 /usr/bin/pkglint
PKGMOGRIFY = /usr/bin/pkgmogrify PKGMOGRIFY = /usr/bin/pkgmogrify


GENERATE_HISTORY= $(WS_TOOLS)/generate-history GENERATE_HISTORY= $(WS_TOOLS)/generate-history
Expand Down
2 changes: 1 addition & 1 deletion make-rules/ips.mk
Expand Up @@ -41,7 +41,7 @@ PKGFMT = /usr/bin/pkgfmt
PKGMOGRIFY = /usr/bin/pkgmogrify PKGMOGRIFY = /usr/bin/pkgmogrify
PKGSEND = /usr/bin/pkgsend PKGSEND = /usr/bin/pkgsend
ifeq ($(strip $(PKGLINT_COMPONENT)),) ifeq ($(strip $(PKGLINT_COMPONENT)),)
PKGLINT = /usr/bin/pkglint PKGLINT = /usr/bin/python3.5 /usr/bin/pkglint
else else
PKGLINT = ${WS_TOOLS}/pkglint PKGLINT = ${WS_TOOLS}/pkglint
endif endif
Expand Down
2 changes: 1 addition & 1 deletion make-rules/shared-macros.mk
Expand Up @@ -843,7 +843,7 @@ GUNZIP = /usr/bin/gunzip
PKGREPO = /usr/bin/pkgrepo PKGREPO = /usr/bin/pkgrepo
PKGSEND = /usr/bin/pkgsend PKGSEND = /usr/bin/pkgsend
ifeq ($(strip $(PKGLINT_COMPONENT)),) ifeq ($(strip $(PKGLINT_COMPONENT)),)
PKGLINT = /usr/bin/pkglint PKGLINT = /usr/bin/python3.5 /usr/bin/pkglint
else else
PKGLINT = ${WS_TOOLS}/pkglint PKGLINT = ${WS_TOOLS}/pkglint
endif endif
Expand Down
12 changes: 6 additions & 6 deletions tools/bass-o-matic
@@ -1,4 +1,4 @@
#!/usr/bin/python2.7 #!/usr/bin/python3.5
# #
# CDDL HEADER START # CDDL HEADER START
# #
Expand Down Expand Up @@ -27,8 +27,6 @@
# on dependency related information. # on dependency related information.
# #


from __future__ import print_function, absolute_import

import os import os
import sys import sys
import re import re
Expand Down Expand Up @@ -65,6 +63,7 @@ def FindComponentPaths(path, debug=False, subdir='components',
proc = subprocess.Popen(cmd, proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True
) )


proc.wait() proc.wait()
Expand Down Expand Up @@ -101,6 +100,7 @@ def FindComponentPaths(path, debug=False, subdir='components',
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
cwd=workspace_path, cwd=workspace_path,
universal_newlines=True
) )


proc.wait() proc.wait()
Expand Down Expand Up @@ -180,7 +180,8 @@ class BassComponent(object):
proc = subprocess.Popen(['gmake', targets], proc = subprocess.Popen(['gmake', targets],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
cwd=path) cwd=path,
universal_newlines=True)
for out in proc.stdout: for out in proc.stdout:
result.append(out) result.append(out)


Expand All @@ -201,8 +202,7 @@ class BassComponent(object):




def main(): def main():
# FLUSH STDOUT sys.stdout.flush()
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)


components = {} components = {}


Expand Down

0 comments on commit fb10bab

Please sign in to comment.