summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-10-18 17:35:55 +0200
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-10-18 17:35:55 +0200
commit3c6970e0471bb8cc9f0dfc124427119d1d48db2e (patch)
treebd7ca42c6a4c0871df9b6e23402308661a7efb16 /bindings
parent4552f3029350cc4fd4d618a65e98d02ac4f312c0 (diff)
downloadlasso-3c6970e0471bb8cc9f0dfc124427119d1d48db2e.tar.gz
lasso-3c6970e0471bb8cc9f0dfc124427119d1d48db2e.tar.xz
lasso-3c6970e0471bb8cc9f0dfc124427119d1d48db2e.zip
[bindings] fix tree traversal on windows
- The file path separator is not / on all platforms, so do not use it when matching filenames.
Diffstat (limited to 'bindings')
-rw-r--r--bindings/bindings.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bindings/bindings.py b/bindings/bindings.py
index 1f8c6dc3..dc18ff4a 100644
--- a/bindings/bindings.py
+++ b/bindings/bindings.py
@@ -153,7 +153,8 @@ class BindingData:
return funcs[0]
regex = re.compile(r'\/\*\*\s(.*?)\*\/', re.DOTALL)
for base, dirnames, filenames in os.walk(srcdir):
- if base.endswith('/.svn'):
+ bname = os.path.basename(base)
+ if bname == '.svn':
# ignore svn directories
continue
if not 'Makefile.am' in filenames:
@@ -561,14 +562,15 @@ def parse_headers(srcdir):
if not binding.options.idwsf:
exclusion += ( 'idwsf_strings.h', )
for base, dirnames, filenames in os.walk(srcdir):
- if base.endswith('/.svn'):
+ bname = os.path.basename(base)
+ if bname == '.svn':
# ignore svn directories
continue
if not 'Makefile.am' in filenames:
# not a source dir
continue
- if not binding.options.idwsf and (base.endswith('/id-wsf') or \
- base.endswith('/id-wsf-2.0') or base.endswith('/ws')):
+ if not binding.options.idwsf and bname == 'id-wsf' or \
+ bname == 'id-wsf-2.0' or bname == 'ws':
# ignore ID-WSF
continue
makefile_am = open(os.path.join(base, 'Makefile.am')).read()