Skip to content

Commit a7bf4bb

Browse files
committed
Verify FALLBACK_VERSION in the makesdist script.
1 parent 8f98a1c commit a7bf4bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: devutils/makesdist

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ to a root user and modification time is set to the git commit time.
77
import sys
88
import os
99
import subprocess
10-
import time
1110
import glob
1211
import tarfile
1312

1413
BASEDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
1514
sys.path.insert(0, BASEDIR)
1615

17-
from setup import versiondata
16+
from setup import versiondata, FALLBACK_VERSION
1817
timestamp = versiondata.getint('DEFAULT', 'timestamp')
1918

19+
vfb = versiondata.get('DEFAULT', 'version').split('.post')[0] + '.post0'
20+
emsg = "Invalid FALLBACK_VERSION. Expected %r got %r."
21+
assert vfb == FALLBACK_VERSION, emsg % (vfb, FALLBACK_VERSION)
22+
2023
print 'Run "setup.py sdist --formats=tar"',
2124
cmd_sdist = [sys.executable] + 'setup.py sdist --formats=tar'.split()
2225
ec = subprocess.call(cmd_sdist, cwd=BASEDIR, stdout=open(os.devnull, 'w'))

0 commit comments

Comments
 (0)