summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-10-18 22:37:14 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2017-10-24 11:26:14 +0100
commit552e49a11dafaff4e50cdc816023f4d929e52187 (patch)
treeac328b11986ec24c068d77d41ecc0ac410f9f9f4
parent0d90c173fb94cc88f7523cd3c8113da43191e2b3 (diff)
downloadpsycopg2-552e49a11dafaff4e50cdc816023f4d929e52187.tar.gz
Test building PG 10 using the solution provided by Jason Erickson
https://github.com/psycopg/psycopg2-wheels/pull/3/
-rw-r--r--.appveyor.yml30
1 files changed, 18 insertions, 12 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 26109ce..b41e7ef 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -73,6 +73,9 @@ matrix:
fast_finish: false
services:
+ # Note: if you change this service also change the path to match in:
+ # - the postgresql.conf customisation in 'init'
+ # - the path in 'build_script'
- postgresql96
cache:
@@ -187,30 +190,33 @@ install:
- IF NOT EXIST %PGTOP%\lib MKDIR %PGTOP%\lib
# Download PostgreSQL source
- CD C:\Others
- - IF NOT EXIST postgres-REL9_6_3.zip (
- curl -fsSL -o postgres-REL9_6_3.zip https://github.com/postgres/postgres/archive/REL9_6_3.zip
+ - IF NOT EXIST postgres-REL_10_0.zip (
+ curl -fsSL -o postgres-REL_10_0.zip https://github.com/postgres/postgres/archive/REL_10_0.zip
)
# Setup build config file (config.pl)
- # Build libpgport first
- # Build libpq
+ # Hack the Mkvcbuild.pm file so we build the lib version of libpq
+ # Build libpgport, libpgcommon, libpq
+ # Copy over includes
+ # Copy over built libraries
# NOTE: Cannot set and use the same variable inside an IF
- - SET PGBUILD=%BUILD_DIR%\postgres-REL9_6_3
+ - SET PGBUILD=%BUILD_DIR%\postgres-REL_10_0
- IF NOT EXIST %PGTOP%\lib\libpq.lib (
CD %BUILD_DIR% &&
- 7z x C:\Others\postgres-REL9_6_3.zip &&
- CD postgres-REL9_6_3\src\tools\msvc &&
+ 7z x C:\Others\postgres-REL_10_0.zip &&
+ CD postgres-REL_10_0\src\tools\msvc &&
ECHO $config-^>{ldap} = 0; > config.pl &&
ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
ECHO.>> config.pl &&
ECHO 1;>> config.pl &&
+ perl -pi.bak -e "s/'libpq', 'dll'/'libpq', 'lib'/g" Mkvcbuild.pm &&
build libpgport &&
+ build libpgcommon &&
+ build libpq &&
XCOPY /E ..\..\include %PGTOP%\include &&
COPY %PGBUILD%\Release\libpgport\libpgport.lib %PGTOP%\lib &&
- CD ..\..\interfaces\libpq &&
- nmake -f win32.mak USE_OPENSSL=1 ENABLE_THREAD_SAFETY=1 SSL_INC=%OPENSSLTOP%\include SSL_LIB_PATH=%OPENSSLTOP%\lib config .\Release\libpq.lib &&
- COPY *.h %PGTOP%\include &&
- COPY Release\libpq.lib %PGTOP%\lib &&
+ COPY %PGBUILD%\Release\libpgcommon\libpgcommon.lib %PGTOP%\lib &&
+ COPY %PGBUILD%\Release\libpq\libpq.lib %PGTOP%\lib &&
CD %BASE_DIR% &&
RMDIR /S /Q %PGBUILD%
)
@@ -223,7 +229,7 @@ build_script:
# Add PostgreSQL binaries to the path
- PATH=C:\Program Files\PostgreSQL\9.6\bin\;%PATH%
- CD C:\Project
- - "%PYTHON%\\python.exe setup.py build_ext --have-ssl -l libpgcommon -L %OPENSSLTOP%\\lib;%PGTOP%\\lib -I %OPENSSLTOP%\\include;%PGTOP%\\include"
+ - "%PYTHON%\\python.exe setup.py build_ext --have-ssl -l libpgcommon -l libpgport -L %OPENSSLTOP%\\lib;%PGTOP%\\lib -I %OPENSSLTOP%\\include;%PGTOP%\\include"
- "%PYTHON%\\python.exe setup.py build"
- "%PYTHON%\\python.exe setup.py install"