summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_install.py2
-rw-r--r--buildtools/wafsamba/samba_utils.py4
-rw-r--r--buildtools/wafsamba/samba_version.py2
-rw-r--r--buildtools/wafsamba/wafsamba.py6
4 files changed, 9 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 05ea56cc47..dda44cd012 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -41,7 +41,7 @@ def install_binary(self):
# tell waf to install the right binary
bld.install_as(os.path.join(install_path, orig_target),
os.path.join(self.path.abspath(bld.env), self.target),
- chmod=0755)
+ chmod=MODE_755)
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index d466cfaada..7ce9f757e9 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -11,6 +11,10 @@ import shlex
LIB_PATH="shared"
+# sigh, python octal constants are a mess
+MODE_644 = int('644', 8)
+MODE_755 = int('755', 8)
+
@conf
def SET_TARGET_TYPE(ctx, target, value):
'''set the target type of a target'''
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 82f882f646..735a70002d 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -173,7 +173,7 @@ class samba_version_file(samba_version):
value = split_line[1].strip('"')
version_dict[split_line[0]] = value
except:
- print "Failed to parse line %s from %s" % (line, version_file)
+ print("Failed to parse line %s from %s" % (line, version_file))
raise
super(samba_version_file, self).__init__(version_dict, have_git=have_git)
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index da046e17a0..262d3bdc98 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -573,7 +573,7 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
-def install_file(bld, destdir, file, chmod=0644, flat=False,
+def install_file(bld, destdir, file, chmod=MODE_644, flat=False,
python_fixup=False, destname=None, base_name=None):
'''install a file'''
destdir = bld.EXPAND_VARIABLES(destdir)
@@ -601,7 +601,7 @@ def install_file(bld, destdir, file, chmod=0644, flat=False,
bld.install_as(dest, file, chmod=chmod)
-def INSTALL_FILES(bld, destdir, files, chmod=0644, flat=False,
+def INSTALL_FILES(bld, destdir, files, chmod=MODE_644, flat=False,
python_fixup=False, destname=None, base_name=None):
'''install a set of files'''
for f in TO_LIST(files):
@@ -611,7 +611,7 @@ def INSTALL_FILES(bld, destdir, files, chmod=0644, flat=False,
Build.BuildContext.INSTALL_FILES = INSTALL_FILES
-def INSTALL_WILDCARD(bld, destdir, pattern, chmod=0644, flat=False,
+def INSTALL_WILDCARD(bld, destdir, pattern, chmod=MODE_644, flat=False,
python_fixup=False, exclude=None, trim_path=None):
'''install a set of files matching a wildcard pattern'''
files=TO_LIST(bld.path.ant_glob(pattern))