Merge branch 'py39-appveyor'

This commit is contained in:
Daniele Varrazzo 2020-11-04 21:22:45 +01:00
commit 7ad357599f
3 changed files with 37 additions and 23 deletions

View File

@ -11,20 +11,22 @@ environment:
matrix: matrix:
# For Python versions available on Appveyor, see # For Python versions available on Appveyor, see
# https://www.appveyor.com/docs/windows-images-software/#python # https://www.appveyor.com/docs/windows-images-software/#python
- {PY_VER: "27", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "32"}
- {PY_VER: "27", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "64"}
- {PY_VER: "38", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "32"}
- {PY_VER: "38", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "64"}
- {PY_VER: "37", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "32"}
- {PY_VER: "37", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "64"}
- {PY_VER: "36", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "32"}
- {PY_VER: "36", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "64"}
- {PY_VER: "35", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", PY_ARCH: "32"}
- {PY_VER: "35", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", PY_ARCH: "64"}
- {PY_VER: "34", PY_ARCH: "32"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "34", PY_ARCH: "32"}
- {PY_VER: "34", PY_ARCH: "64"} - {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "34", PY_ARCH: "64"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "27", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "27", PY_ARCH: "64"}
OPENSSL_VERSION: "1_1_1g" OPENSSL_VERSION: "1_1_1h"
POSTGRES_VERSION: "11_4" POSTGRES_VERSION: "11_4"
PSYCOPG2_TESTDB: psycopg2_test PSYCOPG2_TESTDB: psycopg2_test
@ -35,6 +37,9 @@ environment:
PGPASSWORD: Password12! PGPASSWORD: Password12!
PGSSLMODE: require PGSSLMODE: require
# Add CWD to perl library path for PostgreSQL build on VS2019
PERL5LIB: .
# Select according to the service enabled # Select according to the service enabled
POSTGRES_DIR: C:\Program Files\PostgreSQL\9.6\ POSTGRES_DIR: C:\Program Files\PostgreSQL\9.6\

View File

@ -9,10 +9,10 @@ To invalidate the cache, update this file and check it into git.
Currently used modules built in the cache: Currently used modules built in the cache:
OpenSSL OpenSSL
Version: 1.1.1d Version: 1.1.1h
PostgreSQL PostgreSQL
Version: 11.5 Version: 11.4
NOTE: to zap the cache manually you can also use: NOTE: to zap the cache manually you can also use:

View File

@ -17,6 +17,7 @@ import subprocess as sp
from glob import glob from glob import glob
from pathlib import Path from pathlib import Path
from zipfile import ZipFile from zipfile import ZipFile
from argparse import ArgumentParser
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from urllib.request import urlopen from urllib.request import urlopen
@ -50,6 +51,7 @@ def setup_build_env():
path = [ path = [
str(opt.py_dir), str(opt.py_dir),
str(opt.py_dir / 'Scripts'), str(opt.py_dir / 'Scripts'),
r'C:\Strawberry\Perl\bin',
r'C:\Program Files\Git\mingw64\bin', r'C:\Program Files\Git\mingw64\bin',
os.environ['PATH'], os.environ['PATH'],
] ]
@ -475,7 +477,7 @@ def print_sha1_hashes():
logger.info("artifacts SHA1 hashes:") logger.info("artifacts SHA1 hashes:")
os.chdir(opt.package_dir / 'dist') os.chdir(opt.package_dir / 'dist')
run_command([which('sha1sum'), '-b', f'psycopg2-*/*']) run_command([which('sha1sum'), '-b', 'psycopg2-*/*'])
def setup_ssh(): def setup_ssh():
@ -694,7 +696,7 @@ class Options:
def py_ver(self): def py_ver(self):
"""The Python version to build as 2 digits string.""" """The Python version to build as 2 digits string."""
rv = os.environ['PY_VER'] rv = os.environ['PY_VER']
assert rv in ('27', '34', '35', '36', '37', '38'), rv assert rv in ('27', '34', '35', '36', '37', '38', '39'), rv
return rv return rv
@property @property
@ -762,17 +764,25 @@ class Options:
""" """
The path of the Visual C compiler. The path of the Visual C compiler.
""" """
return Path( if self.vs_ver == '16.0':
r"C:\Program Files (x86)\Microsoft Visual Studio %s\VC" path = Path(
% self.vs_ver r"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build"
) )
else:
path = Path(
r"C:\Program Files (x86)\Microsoft Visual Studio %s\VC"
% self.vs_ver
)
return path
@property @property
def vs_ver(self): def vs_ver(self):
# https://wiki.python.org/moin/WindowsCompilers # https://wiki.python.org/moin/WindowsCompilers
# https://www.appveyor.com/docs/windows-images-software/#python
# Py 2.7 = VS Ver. 9.0 (VS 2008) # Py 2.7 = VS Ver. 9.0 (VS 2008)
# Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010) # Py 3.3, 3.4 = VS Ver. 10.0 (VS 2010)
# Py 3.5--3.8 = VS Ver. 14.0 (VS 2015) # Py 3.5--3.8 = VS Ver. 14.0 (VS 2015)
# Py 3.9 = VS Ver. 16.0 (VS 2019)
vsvers = { vsvers = {
'27': '9.0', '27': '9.0',
'33': '10.0', '33': '10.0',
@ -781,6 +791,7 @@ class Options:
'36': '14.0', '36': '14.0',
'37': '14.0', '37': '14.0',
'38': '14.0', '38': '14.0',
'39': '16.0',
} }
return vsvers[self.py_ver] return vsvers[self.py_ver]
@ -846,8 +857,6 @@ class Options:
def parse_cmdline(): def parse_cmdline():
from argparse import ArgumentParser
parser = ArgumentParser(description=__doc__) parser = ArgumentParser(description=__doc__)
g = parser.add_mutually_exclusive_group() g = parser.add_mutually_exclusive_group()