Skip to content
Permalink
Browse files

Convert oi-userland tools to Python 3.5

  • Loading branch information...
pyhalov committed Aug 8, 2019
1 parent 8a5e2e4 commit fb10babbcfd65ff74cf439bc77a2186fd79ee2a7
@@ -30,7 +30,7 @@
COMPONENT_SRC=nonexistent

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

GENERATE_HISTORY= $(WS_TOOLS)/generate-history
@@ -41,7 +41,7 @@ PKGFMT = /usr/bin/pkgfmt
PKGMOGRIFY = /usr/bin/pkgmogrify
PKGSEND = /usr/bin/pkgsend
ifeq ($(strip $(PKGLINT_COMPONENT)),)
PKGLINT = /usr/bin/pkglint
PKGLINT = /usr/bin/python3.5 /usr/bin/pkglint
else
PKGLINT = ${WS_TOOLS}/pkglint
endif
@@ -843,7 +843,7 @@ GUNZIP = /usr/bin/gunzip
PKGREPO = /usr/bin/pkgrepo
PKGSEND = /usr/bin/pkgsend
ifeq ($(strip $(PKGLINT_COMPONENT)),)
PKGLINT = /usr/bin/pkglint
PKGLINT = /usr/bin/python3.5 /usr/bin/pkglint
else
PKGLINT = ${WS_TOOLS}/pkglint
endif
@@ -1,4 +1,4 @@
#!/usr/bin/python2.7
#!/usr/bin/python3.5
#
# CDDL HEADER START
#
@@ -27,8 +27,6 @@
# on dependency related information.
#

from __future__ import print_function, absolute_import

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

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

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

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


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

components = {}

0 comments on commit fb10bab

Please sign in to comment.
You can’t perform that action at this time.