summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r--source-builder/sb/path.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index 3bf4e0c..679436c 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -92,6 +92,14 @@ def abspath(path):
path = shell(path)
return shell(os.path.abspath(host(path)))
+def relpath(path, start = None):
+ path = shell(path)
+ if start is None:
+ path = os.path.relpath(host(path))
+ else:
+ path = os.path.relpath(host(path), start)
+ return shell(path)
+
def splitext(path):
path = shell(path)
root, ext = os.path.splitext(host(path))