summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-12-18 17:00:18 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-12-18 17:00:18 +0100
commit3a3c5e62c203d96be38df86b0fc80084a426158d (patch)
tree23872480c824065f5eaab9629dbcd6938940fe3b
parent06c3d5fa4a3feccff8bcf8f9d58557ee3c5b2f43 (diff)
downloadtrollius-3a3c5e62c203d96be38df86b0fc80084a426158d.tar.gz
Fix release.py for SDK 7.0
* Enable delayed expansion, needed by setenv.cmd of SDK 7.0 * Replace asyncio with trollius * Restore console colors
-rw-r--r--release.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/release.py b/release.py
index 8476301..24dbd8d 100644
--- a/release.py
+++ b/release.py
@@ -17,6 +17,7 @@ import sys
import tempfile
import textwrap
+PROJECT = 'trollius'
PY3 = (sys.version_info >= (3,))
HG = 'hg'
_PYTHON_VERSIONS = [(2, 7), (3, 3), (3, 4)]
@@ -136,7 +137,7 @@ class Release(object):
self.remove_directory('build')
self.remove_directory('dist')
self.remove_file('_overlapped.pyd')
- self.remove_file(os.path.join('asyncio', '_overlapped.pyd'))
+ self.remove_file(os.path.join(PROJECT, '_overlapped.pyd'))
def sdist_upload(self):
self.cleanup()
@@ -153,8 +154,8 @@ class Release(object):
else:
arch = 'win32'
build_dir = 'lib.%s-%s.%s' % (arch, pyver[0], pyver[1])
- src = os.path.join(self.root, 'build', build_dir, 'asyncio', '_overlapped.pyd')
- dst = os.path.join(self.root, 'asyncio', '_overlapped.pyd')
+ src = os.path.join(self.root, 'build', build_dir, PROJECT, '_overlapped.pyd')
+ dst = os.path.join(self.root, PROJECT, '_overlapped.pyd')
shutil.copyfile(src, dst)
args = (python, 'runtests.py', '-r')
@@ -182,12 +183,15 @@ class Release(object):
cmd = [python, 'setup.py'] + list(cmds)
with tempfile.NamedTemporaryFile(mode="w", suffix=".bat", delete=False) as temp:
- print("CD %s" % self.quote(self.root), file=temp)
+ print("SETLOCAL EnableDelayedExpansion", file=temp)
print(self.quote_args(setenv), file=temp)
print(BATCH_FAIL_ON_ERROR, file=temp)
+ # Restore console colors: lightgrey on black
+ print("COLOR 07", file=temp)
print("", file=temp)
print("SET DISTUTILS_USE_SDK=1", file=temp)
print("SET MSSDK=1", file=temp)
+ print("CD %s" % self.quote(self.root), file=temp)
print(self.quote_args(cmd), file=temp)
print(BATCH_FAIL_ON_ERROR, file=temp)