[rtems-tools commit] Disable installing PYO and PYC. Fix install paths.

Chris Johns chrisj at rtems.org
Fri Feb 19 03:54:26 UTC 2016


Module:    rtems-tools
Branch:    master
Commit:    de1beea245bd18cb9eadfb7dbaea6572269a97cd
Changeset: http://git.rtems.org/rtems-tools/commit/?id=de1beea245bd18cb9eadfb7dbaea6572269a97cd

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Feb 19 11:26:51 2016 +1100

Disable installing PYO and PYC. Fix install paths.

Installing PYO and PYC does not work so disable this. Move the
Python check to the top level and have a single place.

Fix the install paths a revert the 'from . import' changes. This
is resolved by installing into the correct paths.

---

 rtemstoolkit/config.py   |  6 ++++++
 rtemstoolkit/execute.py  |  4 ++--
 rtemstoolkit/git.py      | 10 +++++-----
 rtemstoolkit/log.py      |  2 +-
 rtemstoolkit/macros.py   |  4 ++--
 rtemstoolkit/path.py     |  4 ++--
 rtemstoolkit/version.py  |  5 +++--
 rtemstoolkit/wscript     |  7 ++-----
 tester/rtems-test        |  3 +++
 tester/wscript           |  8 +++-----
 tools/gdb/python/wscript |  4 ++--
 wscript                  | 10 ++++++++++
 12 files changed, 41 insertions(+), 26 deletions(-)

diff --git a/rtemstoolkit/config.py b/rtemstoolkit/config.py
index 70cd05f..ee7cb1c 100644
--- a/rtemstoolkit/config.py
+++ b/rtemstoolkit/config.py
@@ -41,6 +41,12 @@ import os
 import re
 import sys
 
+import error
+import execute
+import log
+import options
+import path
+
 try:
     import error
     import execute
diff --git a/rtemstoolkit/execute.py b/rtemstoolkit/execute.py
index 4125182..3f8e3e6 100755
--- a/rtemstoolkit/execute.py
+++ b/rtemstoolkit/execute.py
@@ -41,8 +41,8 @@ import subprocess
 import threading
 import time
 
-from . import error
-from . import log
+import error
+import log
 
 # Trace exceptions
 trace_threads = False
diff --git a/rtemstoolkit/git.py b/rtemstoolkit/git.py
index 3ba5f7a..20a1aa6 100644
--- a/rtemstoolkit/git.py
+++ b/rtemstoolkit/git.py
@@ -31,11 +31,11 @@
 
 import os
 
-from . import error
-from . import execute
-from . import log
-from . import options
-from . import path
+import error
+import execute
+import log
+import options
+import path
 
 class repo:
     """An object to manage a git repo."""
diff --git a/rtemstoolkit/log.py b/rtemstoolkit/log.py
index 1af914d..1308203 100755
--- a/rtemstoolkit/log.py
+++ b/rtemstoolkit/log.py
@@ -36,7 +36,7 @@ import os
 import sys
 import threading
 
-from . import error
+import error
 
 #
 # A global log.
diff --git a/rtemstoolkit/macros.py b/rtemstoolkit/macros.py
index 5440e5c..632be87 100644
--- a/rtemstoolkit/macros.py
+++ b/rtemstoolkit/macros.py
@@ -38,8 +38,8 @@ import re
 import os
 import string
 
-from . import error
-from . import path
+import error
+import path
 
 #
 # Macro tables
diff --git a/rtemstoolkit/path.py b/rtemstoolkit/path.py
index a767b41..df51005 100644
--- a/rtemstoolkit/path.py
+++ b/rtemstoolkit/path.py
@@ -39,8 +39,8 @@ import os
 import shutil
 import string
 
-from . import error
-from . import log
+import error
+import log
 
 windows = os.name == 'nt'
 
diff --git a/rtemstoolkit/version.py b/rtemstoolkit/version.py
index 139078c..f8b8a7b 100644
--- a/rtemstoolkit/version.py
+++ b/rtemstoolkit/version.py
@@ -35,8 +35,8 @@
 
 import sys
 
-from . import error
-from . import path
+import error
+import path
 
 #
 # Default to an internal string.
@@ -67,6 +67,7 @@ def _load_released_version():
     return _released
 
 def _load_git_version():
+    import git
     global _git
     global _version_str
     repo = git.repo(_at())
diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript
index 4b31471..c7cea36 100644
--- a/rtemstoolkit/wscript
+++ b/rtemstoolkit/wscript
@@ -51,14 +51,11 @@ def configure(conf):
 
     conf.find_program('m4')
 
-    conf.check(header_name='sys/wait.h',  features = 'c', mandatory = False)
-    conf.check_cc(function_name='kill', header_name="signal.h",
+    conf.check(header_name = 'sys/wait.h',  features = 'c', mandatory = False)
+    conf.check_cc(function_name = 'kill', header_name="signal.h",
                   features = 'c', mandatory = False)
     conf.write_config_header('config.h')
 
-    conf.load('python')
-    conf.check_python_version((2,6,6))
-
 def build(bld):
     #
     # The local configuration.
diff --git a/tester/rtems-test b/tester/rtems-test
index f573fea..2a2be48 100755
--- a/tester/rtems-test
+++ b/tester/rtems-test
@@ -35,6 +35,9 @@ parent = os.path.dirname(base)
 rtems = os.path.join(parent, 'share', 'rtems')
 sys.path = [parent, rtems, os.path.join(rtems, 'tester')] + sys.path
 
+import rt.test
+rt.test.run()
+
 try:
     import rt.test
     rt.test.run()
diff --git a/tester/wscript b/tester/wscript
index 85dbd4a..2f6857f 100644
--- a/tester/wscript
+++ b/tester/wscript
@@ -1,6 +1,6 @@
 #
 # RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2015 Chris Johns (chrisj at rtems.org)
+# Copyright 2013-2016 Chris Johns (chrisj at rtems.org)
 # All rights reserved.
 #
 # This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -40,8 +40,6 @@ def options(opt):
 
 def configure(conf):
     recurse(conf)
-    conf.load('python')
-    conf.check_python_version((2,6,6))
 
 def build(bld):
     recurse(bld)
@@ -61,13 +59,13 @@ def build(bld):
                   'rt/test.py',
                   'rt/version.py'],
         install_from = '.',
-        install_path = '${PREFIX}/share/rtems')
+        install_path = '${PREFIX}/share/rtems/tester')
     bld(features = 'py',
         source = ['rt/pygdb/__init__.py',
                   'rt/pygdb/mi_parser.py',
                   'rt/pygdb/spark.py'],
         install_from = '.',
-        install_path = '${PREFIX}/share/rtems')
+        install_path = '${PREFIX}/share/rtems/tester')
     bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0o755)
 
     #
diff --git a/tools/gdb/python/wscript b/tools/gdb/python/wscript
index 1882d0a..1882e1f 100644
--- a/tools/gdb/python/wscript
+++ b/tools/gdb/python/wscript
@@ -6,8 +6,7 @@ def options(opt):
     opt.load('python')
 
 def configure(conf):
-    conf.load('python')
-    conf.check_python_version((2,6,6))
+    pass
 
 def build(bld):
     source = ['__init__.py',
@@ -29,4 +28,5 @@ def build(bld):
               'watchdog.py']
     bld(features = 'py',
         source = source,
+        install_from = '.',
         install_path = '${PREFIX}/share/gdb/python/rtems')
diff --git a/wscript b/wscript
index 9cbf682..5b79cd8 100644
--- a/wscript
+++ b/wscript
@@ -100,6 +100,16 @@ def configure(ctx):
     ctx.end_msg('%s (%s)' % (ctx.env.RTEMS_RELEASE, ctx.env.RTEMS_VERSION))
     ctx.env.C_OPTS = ctx.options.c_opts.split(',')
     check_options(ctx, ctx.options.host)
+    #
+    # Common Python check.
+    #
+    ctx.load('python')
+    ctx.check_python_version((2,6,6))
+    #
+    # Installing the PYO,PYC seems broken on 1.8.19. The path is wrong.
+    #
+    ctx.env.PYO = 0
+    ctx.env.PYC = 0
     recurse(ctx)
 
 def build(ctx):




More information about the vc mailing list