From 8b74beb233b74dbe6e23b6ca59b2dcacd47e0e32 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Tue, 22 Dec 2015 18:12:20 +0100 Subject: [PATCH] Removed the split functions from Node.py --- TODO | 5 ++++- waflib/Node.py | 18 ++++++------------ waflib/extras/unc.py | 4 ++-- waflib/extras/win32_opts.py | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/TODO b/TODO index 848bfcaa..5b36af34 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ Waf 1.9 * Reduce the key size in bld.task_sigs * Provide a more efficient ConfigSet implementation -* Remove the split functions from Utils * Ensure _cache.py are valid python files * Include the tool 'nobuild' by default * Set cflags in the beginning / cppflags at the end @@ -21,3 +20,7 @@ Waf 1.9 and all other issues listed on https://github.com/waf-project/waf/issues +Done +---- +* Remove the split functions from Utils + diff --git a/waflib/Node.py b/waflib/Node.py index fb3cd273..ef622b4b 100644 --- a/waflib/Node.py +++ b/waflib/Node.py @@ -59,12 +59,6 @@ Ant patterns for files and folders to exclude while doing the recursive traversal in :py:meth:`waflib.Node.Node.ant_glob` """ -# TODO remove in waf 1.9 -split_path = Utils.split_path -split_path_unix = Utils.split_path_unix -split_path_cygwin = Utils.split_path_cygwin -split_path_win32 = Utils.split_path_win32 - class Node(object): """ This class is organized in two parts @@ -297,7 +291,7 @@ class Node(object): """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] cur = self for x in lst: @@ -349,7 +343,7 @@ class Node(object): :type lst: string or list of string """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] cur = self for x in lst: @@ -374,7 +368,7 @@ class Node(object): :type lst: string or list of string """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] cur = self for x in lst: @@ -724,7 +718,7 @@ class Node(object): :type lst: string or list of string """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] node = self.get_bld().search_node(lst) if not node: @@ -746,7 +740,7 @@ class Node(object): :type lst: string or list of string """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] node = self.get_bld().search_node(lst) if node: @@ -773,7 +767,7 @@ class Node(object): :type lst: string or list of string """ if isinstance(lst, str): - lst = [x for x in split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] node = self.find_node(lst) try: diff --git a/waflib/extras/unc.py b/waflib/extras/unc.py index d4a9b687..24a4ee68 100644 --- a/waflib/extras/unc.py +++ b/waflib/extras/unc.py @@ -51,7 +51,7 @@ from waflib import Node, Utils, Context def find_resource(self, lst): if isinstance(lst, str): - lst = [x for x in Node.split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] if lst[0].startswith('\\\\'): if len(lst) < 3: @@ -71,7 +71,7 @@ def find_resource(self, lst): def find_or_declare(self, lst): if isinstance(lst, str): - lst = [x for x in Node.split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] if lst[0].startswith('\\\\'): if len(lst) < 3: diff --git a/waflib/extras/win32_opts.py b/waflib/extras/win32_opts.py index 6aad4d53..feee4cf4 100644 --- a/waflib/extras/win32_opts.py +++ b/waflib/extras/win32_opts.py @@ -148,7 +148,7 @@ if Utils.is_win32: def find_or_declare_win32(self, lst): # assuming that "find_or_declare" is called before the build starts, remove the calls to os.path.isfile if isinstance(lst, str): - lst = [x for x in Node.split_path(lst) if x and x != '.'] + lst = [x for x in Utils.split_path(lst) if x and x != '.'] node = self.get_bld().search(lst) if node: