Skip to content

Commit 661a3b7

Browse files
committed
DEV: keep version.tpl in git archive tarball.
Exclude it explicitly when building source tarball with `scons sdist`, because the sdist tarball contains expanded version.hpp.
1 parent 7dc9628 commit 661a3b7

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
/.travis* export-ignore
44
/conda-recipe/ export-ignore
55
/doc export-ignore
6-
/src/diffpy/version.tpl export-ignore

src/SConscript.sdist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def add_version_and_compress(target, source, env):
1111
fpout = gzip.GzipFile(target[0].path + '.gz', 'w', mtime=0)
1212
tfout = tarfile.open(fileobj=fpout, mode='w')
1313
# copy archive members up to version.cpp
14-
tiiter = iter(tfin)
14+
tiiter = (t for t in tfin if not t.name.endswith('/version.tpl'))
1515
for ti in tiiter:
1616
tfout.addfile(ti, tfin.extractfile(ti))
1717
if ti.name.endswith('diffpy/version.cpp'):

0 commit comments

Comments
 (0)