mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-10 19:16:34 +03:00
Merge branch 'openssl-1.1-windows'
This commit is contained in:
commit
4821a6294e
|
@ -24,7 +24,7 @@ environment:
|
|||
- {PYVER: "34", PYTHON_ARCH: "32"}
|
||||
- {PYVER: "34", PYTHON_ARCH: "64"}
|
||||
|
||||
OPENSSL_VERSION: "1_0_2r"
|
||||
OPENSSL_VERSION: "1_1_1b"
|
||||
POSTGRES_VERSION: "11_2"
|
||||
|
||||
PSYCOPG2_TESTDB: psycopg2_test
|
||||
|
@ -135,11 +135,9 @@ install:
|
|||
If ($env:PYTHON_ARCH -Match "32" ) {
|
||||
$env:VCVARS_PLATFORM="x86"
|
||||
$env:TARGET="VC-WIN32"
|
||||
$env:DO="do_ms"
|
||||
} Else {
|
||||
$env:VCVARS_PLATFORM="amd64"
|
||||
$env:TARGET="VC-WIN64A"
|
||||
$env:DO="do_win64a"
|
||||
$env:CPU="AMD64"
|
||||
}
|
||||
# Download OpenSSL source
|
||||
|
@ -148,22 +146,12 @@ install:
|
|||
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
|
||||
# to support the new library names. Below are commands to build OpenSSL
|
||||
# 1.1.0:
|
||||
# - mkdir _build
|
||||
# - cd _build
|
||||
# - perl ..\Configure %TARGET% no-asm no-shared --prefix=%BASE_DIR%\openssl --openssldir=%BASE_DIR%\openssl
|
||||
# - nmake build_libs install_dev
|
||||
- IF NOT EXIST %OPENSSLTOP%\lib\ssleay32.lib (
|
||||
- IF NOT EXIST %OPENSSLTOP%\lib\libssl.lib (
|
||||
CD %BUILD_DIR% &&
|
||||
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 &&
|
||||
nmake build_libs install_dev &&
|
||||
CD %BASE_DIR% &&
|
||||
RMDIR /S /Q %BUILD_DIR%\openssl-OpenSSL_%OPENSSL_VERSION%
|
||||
)
|
||||
|
@ -190,12 +178,16 @@ install:
|
|||
# Copy over built libraries
|
||||
# Prepare local include directory for building from
|
||||
# Build pg_config in place
|
||||
# Note patch for OpenSSL 1.1 configuration. See:
|
||||
# https://www.postgresql-archive.org/Compile-psql-9-6-with-SSL-Version-1-1-0-td6054118.html
|
||||
# NOTE: Cannot set and use the same variable inside an IF
|
||||
- SET PGBUILD=%BUILD_DIR%\postgres-REL_%POSTGRES_VERSION%
|
||||
- IF NOT EXIST %PGTOP%\lib\libpq.lib (
|
||||
CD %BUILD_DIR% &&
|
||||
7z x C:\Others\postgres-REL_%POSTGRES_VERSION%.zip &&
|
||||
CD postgres-REL_%POSTGRES_VERSION%\src\tools\msvc &&
|
||||
CD postgres-REL_%POSTGRES_VERSION% &&
|
||||
patch -p1 < %APPVEYOR_BUILD_FOLDER%\scripts\win_openssl_11.patch &&
|
||||
CD src\tools\msvc &&
|
||||
ECHO $config-^>{ldap} = 0; > config.pl &&
|
||||
ECHO $config-^>{openssl} = "%OPENSSLTOP:\=\\%"; >> config.pl &&
|
||||
ECHO.>> config.pl &&
|
||||
|
|
2
NEWS
2
NEWS
|
@ -6,6 +6,8 @@ What's new in psycopg 2.8.2
|
|||
|
||||
- Fixed `~psycopg2.extras.RealDictCursor` when there are repeated columns
|
||||
(:ticket:`#884`).
|
||||
- Binary packages built with openssl 1.1.1b. Should fix concurrency problems
|
||||
(:tickets:`#543, #836`).
|
||||
|
||||
|
||||
What's new in psycopg 2.8.1
|
||||
|
|
|
@ -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.2r
|
||||
Version: 1.1.1b
|
||||
|
||||
PostgreSQL
|
||||
Version: 11.2
|
||||
|
|
20
scripts/win_openssl_11.patch
Normal file
20
scripts/win_openssl_11.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
|
||||
index dfd6972383..72d1259ffb 100644
|
||||
--- a/src/include/pg_config.h.win32
|
||||
+++ b/src/include/pg_config.h.win32
|
||||
@@ -74,12 +74,15 @@
|
||||
|
||||
/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
|
||||
/* #undef HAVE_ASN1_STRING_GET0_DATA */
|
||||
+#define HAVE_ASN1_STRING_GET0_DATA 1
|
||||
|
||||
/* Define to 1 if you have the `BIO_get_data' function. */
|
||||
/* #undef HAVE_BIO_GET_DATA */
|
||||
+#define HAVE_BIO_GET_DATA 1
|
||||
|
||||
/* Define to 1 if you have the `BIO_meth_new' function. */
|
||||
/* #undef HAVE_BIO_METH_NEW */
|
||||
+#define HAVE_BIO_METH_NEW 1
|
||||
|
||||
/* Define to 1 if you have the `cbrt' function. */
|
||||
//#define HAVE_CBRT 1
|
4
setup.py
4
setup.py
|
@ -366,8 +366,8 @@ For further information please check the 'doc/src/install.rst' file (also at
|
|||
self.library_dirs.append(os.path.join(path, "ms"))
|
||||
break
|
||||
if self.have_ssl:
|
||||
self.libraries.append("libeay32")
|
||||
self.libraries.append("ssleay32")
|
||||
self.libraries.append("libcrypto")
|
||||
self.libraries.append("libssl")
|
||||
self.libraries.append("crypt32")
|
||||
self.libraries.append("user32")
|
||||
self.libraries.append("gdi32")
|
||||
|
|
Loading…
Reference in New Issue
Block a user