Changeset c5286cd in rtems-tools


Ignore:
Timestamp:
Apr 10, 2018, 3:59:11 AM (14 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
cf641a6
Parents:
252d21c
Message:

waf: Add getcwd() to sys.path as waf has changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r252d21c rc5286cd  
    11#
    22# RTEMS Tools Project (http://www.rtems.org/)
    3 # Copyright 2014-2015 Chris Johns (chrisj@rtems.org)
     3# Copyright 2014-2018 Chris Johns (chrisj@rtems.org)
    44# All rights reserved.
    55#
     
    5151        release = v.get('version', 'release')
    5252    else:
    53         from rtemstoolkit import git
     53        #
     54        # waf after 1.9.9 does not place the current directory in Python's
     55        # system path which means importing the RTEMS toolkit
     56        # fails. Temporarily add it so we can import the git module.
     57        #
     58        import sys
     59        current_sys_path = sys.path
     60        try:
     61            sys.path = [os.getcwd()] + sys.path
     62            from rtemstoolkit import git
     63        finally:
     64            sys.path = current_sys_path
    5465        repo = git.repo('.')
    5566        if repo.valid():
Note: See TracChangeset for help on using the changeset viewer.