Skip to content

Commit

Permalink
Merge branch 'master' into rm-3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 9, 2020
2 parents 1502a2e + 7ad3575 commit adef168
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 25 deletions.
29 changes: 17 additions & 12 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ environment:
matrix:
# For Python versions available on Appveyor, see
# https://www.appveyor.com/docs/windows-images-software/#python
- {PY_VER: "27", PY_ARCH: "32"}
- {PY_VER: "27", PY_ARCH: "64"}
- {PY_VER: "38", PY_ARCH: "32"}
- {PY_VER: "38", PY_ARCH: "64"}
- {PY_VER: "37", PY_ARCH: "32"}
- {PY_VER: "37", PY_ARCH: "64"}
- {PY_VER: "36", PY_ARCH: "32"}
- {PY_VER: "36", PY_ARCH: "64"}
- {PY_VER: "35", PY_ARCH: "32"}
- {PY_VER: "35", PY_ARCH: "64"}

OPENSSL_VERSION: "1_1_1g"
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019, PY_VER: "39", PY_ARCH: "64"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "38", PY_ARCH: "64"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "37", PY_ARCH: "64"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "36", PY_ARCH: "64"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", PY_ARCH: "32"}
- {APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015, PY_VER: "35", 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_1h"
POSTGRES_VERSION: "11_4"

PSYCOPG2_TESTDB: psycopg2_test
Expand All @@ -33,6 +35,9 @@ environment:
PGPASSWORD: Password12!
PGSSLMODE: require

# Add CWD to perl library path for PostgreSQL build on VS2019
PERL5LIB: .

# Select according to the service enabled
POSTGRES_DIR: C:\Program Files\PostgreSQL\9.6\

Expand Down
3 changes: 2 additions & 1 deletion doc/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ How to make a psycopg2 release
- Create a signed tag with the content of the relevant NEWS bit and push it.
E.g.::

$ git tag -a -s 2_8_4
# Tag name will be 2_8_4
$ git tag -a -s ${VERSION//\./_}

Psycopg 2.8.4 released

Expand Down
2 changes: 1 addition & 1 deletion doc/src/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You may then import the ``psycopg`` package, as usual:
cur = conn.cursor()
# Execute a query
cur.execute("SELECT * FROM my_data");
cur.execute("SELECT * FROM my_data")
# Retrieve query results
records = cur.fetchall()
Expand Down
4 changes: 2 additions & 2 deletions scripts/appveyor.cache_rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ To invalidate the cache, update this file and check it into git.
Currently used modules built in the cache:

OpenSSL
Version: 1.1.1d
Version: 1.1.1h

PostgreSQL
Version: 11.5
Version: 11.4


NOTE: to zap the cache manually you can also use:
Expand Down
25 changes: 17 additions & 8 deletions scripts/appveyor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from glob import glob
from pathlib import Path
from zipfile import ZipFile
from argparse import ArgumentParser
from tempfile import NamedTemporaryFile
from urllib.request import urlopen

Expand Down Expand Up @@ -50,6 +51,7 @@ def setup_build_env():
path = [
str(opt.py_dir),
str(opt.py_dir / 'Scripts'),
r'C:\Strawberry\Perl\bin',
r'C:\Program Files\Git\mingw64\bin',
os.environ['PATH'],
]
Expand Down Expand Up @@ -475,7 +477,7 @@ def print_sha1_hashes():
logger.info("artifacts SHA1 hashes:")

os.chdir(opt.package_dir / 'dist')
run_command([which('sha1sum'), '-b', f'psycopg2-*/*'])
run_command([which('sha1sum'), '-b', 'psycopg2-*/*'])


def setup_ssh():
Expand Down Expand Up @@ -694,7 +696,7 @@ class Options:
def py_ver(self):
"""The Python version to build as 2 digits string."""
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

@property
Expand Down Expand Up @@ -762,22 +764,31 @@ def vc_dir(self):
"""
The path of the Visual C compiler.
"""
return Path(
r"C:\Program Files (x86)\Microsoft Visual Studio %s\VC"
% self.vs_ver
)
if self.vs_ver == '16.0':
path = Path(
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
def vs_ver(self):
# 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 3.5--3.8 = VS Ver. 14.0 (VS 2015)
# Py 3.9 = VS Ver. 16.0 (VS 2019)
vsvers = {
'27': '9.0',
'35': '14.0',
'36': '14.0',
'37': '14.0',
'38': '14.0',
'39': '16.0',
}
return vsvers[self.py_ver]

Expand Down Expand Up @@ -843,8 +854,6 @@ def dist_dir(self):


def parse_cmdline():
from argparse import ArgumentParser

parser = ArgumentParser(description=__doc__)

g = parser.add_mutually_exclusive_group()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# Take a look at https://www.python.org/dev/peps/pep-0440/
# for a consistent versioning pattern.

PSYCOPG_VERSION = '2.8.6'
PSYCOPG_VERSION = '2.8.7.dev0'


# note: if you are changing the list of supported Python version please fix
Expand Down

0 comments on commit adef168

Please sign in to comment.