diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-18 21:25:30 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-20 21:58:06 +1000 |
commit | 921b927d3011b753a51d450a451d5f49abac9e56 (patch) | |
tree | cd723b1e3522b217094e009c8456b387545a70a7 /wscript | |
parent | 7a59c3d9b8e4a5bab21d9b82cec6a77d1f808f90 (diff) | |
download | samba-921b927d3011b753a51d450a451d5f49abac9e56.tar.gz samba-921b927d3011b753a51d450a451d5f49abac9e56.tar.bz2 samba-921b927d3011b753a51d450a451d5f49abac9e56.zip |
build: Do not put a .distversion file into the GIT tree
This places the file only in the tarball, and shows how to
auto-generate other files for placement in the tarball.
Andrew Bartlett
Diffstat (limited to 'wscript')
-rwxr-xr-x | wscript | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -6,7 +6,7 @@ blddir = 'bin' APPNAME='samba' VERSION=None -import sys, os +import sys, os, tempfile sys.path.insert(0, srcdir+"/buildtools/wafsamba") import wafsamba, Options, samba_dist, Scripting, Utils, samba_version @@ -245,15 +245,18 @@ def dist(): if sambaversion.IS_SNAPSHOT: # write .distversion file and add to tar - f = '.distversion' - distversionf = open(f, 'w') + distversionf = tempfile.NamedTemporaryFile(mode='w', prefix='.distversion',dir=blddir) for field in sambaversion.vcs_fields: distveroption = field + '=' + str(sambaversion.vcs_fields[field]) distversionf.write(distveroption + '\n') + distversionf.flush() + samba_dist.DIST_FILES('%s:.distversion' % distversionf.name) + + samba_dist.dist() distversionf.close() - samba_dist.DIST_FILES('.distversion') + else: + samba_dist.dist() - samba_dist.dist() def distcheck(): '''test that distribution tarball builds and installs''' |