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.
This commit is contained in:
Chris Johns 2016-02-19 11:26:51 +11:00
parent 4351ae5eff
commit de1beea245
12 changed files with 41 additions and 26 deletions

View File

@ -41,6 +41,12 @@ import os
import re import re
import sys import sys
import error
import execute
import log
import options
import path
try: try:
import error import error
import execute import execute

View File

@ -41,8 +41,8 @@ import subprocess
import threading import threading
import time import time
from . import error import error
from . import log import log
# Trace exceptions # Trace exceptions
trace_threads = False trace_threads = False

View File

@ -31,11 +31,11 @@
import os import os
from . import error import error
from . import execute import execute
from . import log import log
from . import options import options
from . import path import path
class repo: class repo:
"""An object to manage a git repo.""" """An object to manage a git repo."""

View File

@ -36,7 +36,7 @@ import os
import sys import sys
import threading import threading
from . import error import error
# #
# A global log. # A global log.

View File

@ -38,8 +38,8 @@ import re
import os import os
import string import string
from . import error import error
from . import path import path
# #
# Macro tables # Macro tables

View File

@ -39,8 +39,8 @@ import os
import shutil import shutil
import string import string
from . import error import error
from . import log import log
windows = os.name == 'nt' windows = os.name == 'nt'

View File

@ -35,8 +35,8 @@
import sys import sys
from . import error import error
from . import path import path
# #
# Default to an internal string. # Default to an internal string.
@ -67,6 +67,7 @@ def _load_released_version():
return _released return _released
def _load_git_version(): def _load_git_version():
import git
global _git global _git
global _version_str global _version_str
repo = git.repo(_at()) repo = git.repo(_at())

View File

@ -51,14 +51,11 @@ def configure(conf):
conf.find_program('m4') conf.find_program('m4')
conf.check(header_name='sys/wait.h', features = 'c', mandatory = False) conf.check(header_name = 'sys/wait.h', features = 'c', mandatory = False)
conf.check_cc(function_name='kill', header_name="signal.h", conf.check_cc(function_name = 'kill', header_name="signal.h",
features = 'c', mandatory = False) features = 'c', mandatory = False)
conf.write_config_header('config.h') conf.write_config_header('config.h')
conf.load('python')
conf.check_python_version((2,6,6))
def build(bld): def build(bld):
# #
# The local configuration. # The local configuration.

View File

@ -35,6 +35,9 @@ parent = os.path.dirname(base)
rtems = os.path.join(parent, 'share', 'rtems') rtems = os.path.join(parent, 'share', 'rtems')
sys.path = [parent, rtems, os.path.join(rtems, 'tester')] + sys.path sys.path = [parent, rtems, os.path.join(rtems, 'tester')] + sys.path
import rt.test
rt.test.run()
try: try:
import rt.test import rt.test
rt.test.run() rt.test.run()

View File

@ -1,6 +1,6 @@
# #
# RTEMS Tools Project (http://www.rtems.org/) # RTEMS Tools Project (http://www.rtems.org/)
# Copyright 2015 Chris Johns (chrisj@rtems.org) # Copyright 2013-2016 Chris Johns (chrisj@rtems.org)
# All rights reserved. # All rights reserved.
# #
# This file is part of the RTEMS Tools package in 'rtems-tools'. # This file is part of the RTEMS Tools package in 'rtems-tools'.
@ -40,8 +40,6 @@ def options(opt):
def configure(conf): def configure(conf):
recurse(conf) recurse(conf)
conf.load('python')
conf.check_python_version((2,6,6))
def build(bld): def build(bld):
recurse(bld) recurse(bld)
@ -61,13 +59,13 @@ def build(bld):
'rt/test.py', 'rt/test.py',
'rt/version.py'], 'rt/version.py'],
install_from = '.', install_from = '.',
install_path = '${PREFIX}/share/rtems') install_path = '${PREFIX}/share/rtems/tester')
bld(features = 'py', bld(features = 'py',
source = ['rt/pygdb/__init__.py', source = ['rt/pygdb/__init__.py',
'rt/pygdb/mi_parser.py', 'rt/pygdb/mi_parser.py',
'rt/pygdb/spark.py'], 'rt/pygdb/spark.py'],
install_from = '.', install_from = '.',
install_path = '${PREFIX}/share/rtems') install_path = '${PREFIX}/share/rtems/tester')
bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0o755) bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0o755)
# #

View File

@ -6,8 +6,7 @@ def options(opt):
opt.load('python') opt.load('python')
def configure(conf): def configure(conf):
conf.load('python') pass
conf.check_python_version((2,6,6))
def build(bld): def build(bld):
source = ['__init__.py', source = ['__init__.py',
@ -29,4 +28,5 @@ def build(bld):
'watchdog.py'] 'watchdog.py']
bld(features = 'py', bld(features = 'py',
source = source, source = source,
install_from = '.',
install_path = '${PREFIX}/share/gdb/python/rtems') install_path = '${PREFIX}/share/gdb/python/rtems')

10
wscript
View File

@ -100,6 +100,16 @@ def configure(ctx):
ctx.end_msg('%s (%s)' % (ctx.env.RTEMS_RELEASE, ctx.env.RTEMS_VERSION)) ctx.end_msg('%s (%s)' % (ctx.env.RTEMS_RELEASE, ctx.env.RTEMS_VERSION))
ctx.env.C_OPTS = ctx.options.c_opts.split(',') ctx.env.C_OPTS = ctx.options.c_opts.split(',')
check_options(ctx, ctx.options.host) 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) recurse(ctx)
def build(ctx): def build(ctx):