From 446016696108159959730899254691f3c8636f1f Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 29 Jan 2018 01:56:10 +0000 Subject: [PATCH 1/3] Build env vars on windows less verbose Copied from psycopg2-wheels --- .appveyor.yml | 73 ++++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 47 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index b0bb194a..7c14e45e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,52 +13,16 @@ environment: matrix: # For Python versions available on Appveyor, see # http://www.appveyor.com/docs/installed-software#python - - # Py 2.7 = VS Ver. 9.0 (VS 2008) - # Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010) - # Py 3.5, 3.6 = VS Ver. 14.0 (VS 2015) - - - PYTHON: C:\Python27-x64 - PYTHON_ARCH: 64 - VS_VER: 9.0 - - - PYTHON: C:\Python27 - PYTHON_ARCH: 32 - VS_VER: 9.0 - - - PYTHON: C:\Python36-x64 - PYTHON_ARCH: 64 - VS_VER: 14.0 - - - PYTHON: C:\Python36 - PYTHON_ARCH: 32 - VS_VER: 14.0 - - - PYTHON: C:\Python35-x64 - PYTHON_ARCH: 64 - VS_VER: 14.0 - - - PYTHON: C:\Python35 - PYTHON_ARCH: 32 - VS_VER: 14.0 - - - PYTHON: C:\Python34-x64 - DISTUTILS_USE_SDK: '1' - PYTHON_ARCH: 64 - VS_VER: 10.0 - - - PYTHON: C:\Python34 - PYTHON_ARCH: 32 - VS_VER: 10.0 - - - PYTHON: C:\Python33-x64 - DISTUTILS_USE_SDK: '1' - PYTHON_ARCH: 64 - VS_VER: 10.0 - - - PYTHON: C:\Python33 - PYTHON_ARCH: 32 - VS_VER: 10.0 + - {PYVER: "27", PYTHON_ARCH: "32"} + - {PYVER: "27", PYTHON_ARCH: "64"} + - {PYVER: "33", PYTHON_ARCH: "32"} + - {PYVER: "33", PYTHON_ARCH: "64"} + - {PYVER: "34", PYTHON_ARCH: "32"} + - {PYVER: "34", PYTHON_ARCH: "64"} + - {PYVER: "35", PYTHON_ARCH: "32"} + - {PYVER: "35", PYTHON_ARCH: "64"} + - {PYVER: "36", PYTHON_ARCH: "32"} + - {PYVER: "36", PYTHON_ARCH: "64"} PSYCOPG2_TESTDB: psycopg2_test PSYCOPG2_TESTDB_USER: postgres @@ -86,7 +50,22 @@ cache: init: # Uncomment next line to get RDP access during the build. #- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - # + + # Set env variable according to the build environment + - SET PYTHON=C:\Python%PYVER% + - IF "%PYTHON_ARCH%"=="64" SET PYTHON=%PYTHON%-x64 + + # Py 2.7 = VS Ver. 9.0 (VS 2008) + # Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010) + # Py 3.5, 3.6 = VS Ver. 14.0 (VS 2015) + - IF "%PYVER%"=="27" SET VS_VER=9.0 + - IF "%PYVER%"=="33" SET VS_VER=10.0 + - IF "%PYVER%"=="34" SET VS_VER=10.0 + - IF "%PYVER%"=="35" SET VS_VER=14.0 + - IF "%PYVER%"=="36" SET VS_VER=14.0 + + - IF "%VS_VER%"=="10.0" IF "%PYTHON_ARCH%"=="64" SET DISTUTILS_USE_SDK=1 + # Set Python to the path - SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\Program Files\Git\mingw64\bin;%PATH% From 8f6a26b9112d1197e1e3c31a2d51fb4cde35914f Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 29 Jan 2018 01:57:17 +0000 Subject: [PATCH 2/3] Define openssl and libpq versions in vars in appveyor build --- .appveyor.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7c14e45e..348b671c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,6 +24,9 @@ environment: - {PYVER: "36", PYTHON_ARCH: "32"} - {PYVER: "36", PYTHON_ARCH: "64"} + OPENSSL_VERSION: "1_0_2m" + POSTGRES_VERSION: "10_1" + PSYCOPG2_TESTDB: psycopg2_test PSYCOPG2_TESTDB_USER: postgres PSYCOPG2_TESTDB_PASSWORD: Password12! @@ -141,8 +144,8 @@ install: } # Download OpenSSL source - CD C:\Others - - IF NOT EXIST OpenSSL_1_0_2m.zip ( - curl -fsSL -o OpenSSL_1_0_2m.zip https://github.com/openssl/openssl/archive/OpenSSL_1_0_2m.zip + - IF NOT EXIST OpenSSL_%OPENSSL_VERSION%.zip ( + curl -fsSL -o OpenSSL_%OPENSSL_VERSION%.zip https://github.com/openssl/openssl/archive/OpenSSL_%OPENSSL_VERSION%.zip ) # To use OpenSSL >= 1.1.0, both libpq and psycopg build environments have @@ -154,15 +157,15 @@ install: # - nmake build_libs install_dev - IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib ( CD %BUILD_DIR% && - 7z x C:\Others\OpenSSL_1_0_2m.zip && - CD openssl-OpenSSL_1_0_2m && + 7z x C:\Others\OpenSSL_%OPENSSL_VERSION%.zip && + CD openssl-OpenSSL_%OPENSSL_VERSION% && perl Configure %TARGET% no-asm no-shared no-zlib --prefix=%OPENSSLTOP% --openssldir=%OPENSSLTOP% && CALL ms\%DO% && nmake -f ms\nt.mak init headers lib && COPY inc32\openssl\*.h %OPENSSLTOP%\include\openssl && COPY out32\*.lib %OPENSSLTOP%\lib && CD %BASE_DIR% && - RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_1_0_2m + RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_%OPENSSL_VERSION% ) # Setup directories for building PostgreSQL librarires @@ -176,8 +179,8 @@ install: # Download PostgreSQL source - CD C:\Others - - IF NOT EXIST postgres-REL_10_1.zip ( - curl -fsSL -o postgres-REL_10_1.zip https://github.com/postgres/postgres/archive/REL_10_1.zip + - IF NOT EXIST postgres-REL_%POSTGRES_VERSION%.zip ( + curl -fsSL -o postgres-REL_%POSTGRES_VERSION%.zip https://github.com/postgres/postgres/archive/REL_%POSTGRES_VERSION%.zip ) # Setup build config file (config.pl) @@ -188,11 +191,11 @@ install: # Prepare local include directory for building from # Build pg_config in place # NOTE: Cannot set and use the same variable inside an IF - - SET PGBUILD=%BUILD_DIR%\postgres-REL_10_1 + - SET PGBUILD=%BUILD_DIR%\postgres-REL_%POSTGRES_VERSION% - IF NOT EXIST %PGTOP%\lib\libpq.lib ( CD %BUILD_DIR% && - 7z x C:\Others\postgres-REL_10_1.zip && - CD postgres-REL_10_1\src\tools\msvc && + 7z x C:\Others\postgres-REL_%POSTGRES_VERSION%.zip && + CD postgres-REL_%POSTGRES_VERSION%\src\tools\msvc && ECHO $config-^>{ldap} = 0; > config.pl && ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl && ECHO.>> config.pl && From a5762a4e4b285ecbbb0c7d88bc4ab64b337ffb82 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 29 Jan 2018 01:58:37 +0000 Subject: [PATCH 3/3] Build using OpenSSL 1.0.2n --- .appveyor.yml | 2 +- NEWS | 2 +- scripts/appveyor.cache_rebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 348b671c..bbe0eea7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -24,7 +24,7 @@ environment: - {PYVER: "36", PYTHON_ARCH: "32"} - {PYVER: "36", PYTHON_ARCH: "64"} - OPENSSL_VERSION: "1_0_2m" + OPENSSL_VERSION: "1_0_2n" POSTGRES_VERSION: "10_1" PSYCOPG2_TESTDB: psycopg2_test diff --git a/NEWS b/NEWS index 07342e6e..d000e9fd 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,7 @@ What's new in psycopg 2.7.4 - Fixed `~cursor.rowcount` after `~cursor.executemany()` with :sql:`RETURNING` statements (:ticket:`633`). - Fixed compatibility problem with pypy3 (:ticket:`#649`). -- Wheel packages compiled against PostgreSQL 10.1 libpq and OpenSSL 1.0.2m. +- Wheel packages compiled against PostgreSQL 10.1 libpq and OpenSSL 1.0.2n. What's new in psycopg 2.7.3.2 diff --git a/scripts/appveyor.cache_rebuild b/scripts/appveyor.cache_rebuild index da1b2be5..04825149 100644 --- a/scripts/appveyor.cache_rebuild +++ b/scripts/appveyor.cache_rebuild @@ -9,7 +9,7 @@ To invalidate the cache, update this file and check it into git. Currently used modules built in the cache: OpenSSL - Version: 1.0.2m + Version: 1.0.2n PostgreSQL Version: 10.1