Dropped problematic init step

It was performed before repos cloned so no resource available (including
the script!)
This commit is contained in:
Daniele Varrazzo 2019-04-15 03:51:31 +01:00
parent fda738c90d
commit 591476621c
2 changed files with 17 additions and 27 deletions

View File

@ -49,31 +49,28 @@ cache:
- C:\Others -> scripts\appveyor.cache_rebuild
# Script called before repo cloning
init:
# TODO: move functionalities out of init to drop this fetch problem
- curl -fsSL -o "C:\\appveyor.py" https://raw.githubusercontent.com/psycopg/psycopg2/%APPVEYOR_REPO_COMMIT%/scripts/appveyor.py
- "%PYEXE% C:\\appveyor.py init"
# init:
# Repository gets cloned, Cache is restored
install:
- "%PYEXE% C:\\appveyor.py install"
- "%PYEXE% scripts\\appveyor.py install"
# PostgreSQL server starts now
build: off
build_script:
- "%PYEXE% C:\\appveyor.py build_script"
- "%PYEXE% scripts\\appveyor.py build_script"
after_build:
- "%PYEXE% C:\\appveyor.py after_build"
- "%PYEXE% scripts\\appveyor.py after_build"
before_test:
- "%PYEXE% C:\\appveyor.py before_test"
- "%PYEXE% scripts\\appveyor.py before_test"
test_script:
- "%PYEXE% C:\\appveyor.py test_script"
- "%PYEXE% scripts\\appveyor.py test_script"
# vim: set ts=4 sts=4 sw=4:

View File

@ -64,23 +64,15 @@ def setup_env():
)
# Fix problem with VS2010 Express 64bit missing vcvars64.bat
# Note: repository not cloned at this point, so need to fetch
# file another way
if vs_ver() == '10.0':
if not os.path.exists(
os.path.join(vc_dir(), r"bin\amd64\vcvars64.bat")
):
logger.info("Fixing VS2010 Express and 64bit builds")
with urlopen(
"https://raw.githubusercontent.com/psycopg/psycopg2/"
"master/scripts/vcvars64-vs2010.bat"
) as f:
data = f.read()
with open(
os.path.join(vc_dir(), r"bin\amd64\vcvars64.bat"), 'w'
) as f:
f.write(data)
shutil.copy(
os.path.join(clone_dir(), r"scripts\vcvars64-vs2010.bat"),
os.path.join(vc_dir(), r"bin\amd64\vcvars64.bat"),
)
logger.info("Configuring compiler")
bat_call(
@ -100,7 +92,7 @@ def python_info():
)
def step_init():
def step_install():
python_info()
# The program rc.exe on 64bit with some versions look in the wrong path
@ -122,12 +114,9 @@ def step_init():
print("max_prepared_transactions = 10", file=f)
def step_install():
def step_build_script():
build_openssl()
build_libpq()
def step_build_script():
build_psycopg()
@ -285,7 +274,7 @@ $config->{openssl} = "%s";
def build_psycopg():
os.chdir(r"C:\Project")
os.chdir(clone_dir())
# Find the pg_config just built
path = os.pathsep.join(
@ -472,6 +461,10 @@ def vs_ver(pyver=None):
return vsver
def clone_dir():
return r"C:\Project"
def pg_dir():
return r"C:\Program Files\PostgreSQL\9.6"