This commit is contained in:
hugovk 2016-08-29 15:06:48 +03:00
parent 5a0104f64d
commit 99945b5287
3 changed files with 13 additions and 10 deletions

View File

@ -1,4 +1,4 @@
#/usr/bin/env python3
#!/usr/bin/env python3
import subprocess
import shutil
@ -6,7 +6,8 @@ import sys
import getopt
import os
from config import *
from config import (compilers, compiler_from_env, pythons, pyversion_from_env,
VIRT_BASE, X64_EXT)
def setup_vms():
@ -131,8 +132,8 @@ def main(op):
def run_one(op):
compiler = compiler_fromEnv()
py_version = pyversion_fromEnv()
compiler = compiler_from_env()
py_version = pyversion_from_env()
run_script((py_version,
"\n".join([header(op),
@ -153,7 +154,7 @@ if __name__ == '__main__':
op = "bdist_wininst --user-access-control=auto"
elif '--wheel' in opts:
op = "bdist_wheel"
if 'PYTHON' in os.environ:
run_one(op)
else:

View File

@ -3,7 +3,7 @@ from untar import untar
import os
import hashlib
from config import compilers, compiler_fromEnv, libs
from config import compilers, compiler_from_env, libs
def _relpath(*args):
@ -301,11 +301,13 @@ def add_compiler(compiler):
mkdirs()
extract_libs()
script = [header(), cp_tk(libs['tk-8.5']['version'], libs['tk-8.6']['version'])]
script = [header(),
cp_tk(libs['tk-8.5']['version'],
libs['tk-8.6']['version'])]
if 'PYTHON' in os.environ:
add_compiler(compiler_fromEnv())
add_compiler(compiler_from_env())
else:
# for compiler in compilers.values():
# add_compiler(compiler)

View File

@ -113,7 +113,7 @@ compilers = {
}
def pyversion_fromEnv():
def pyversion_from_env():
py = os.environ['PYTHON']
py_version = '27'
@ -128,7 +128,7 @@ def pyversion_fromEnv():
return py_version
def compiler_fromEnv():
def compiler_from_env():
py = os.environ['PYTHON']
for k, v in pythons.items():