From 94dead944094af6950c2b8c0046f0bd55e31e2b6 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Tue, 16 Jun 2020 18:00:46 +0200 Subject: [PATCH 01/22] Add Python 3.9 (beta 3) to builds --- cibuildwheel/linux.py | 5 +++++ cibuildwheel/macos.py | 1 + cibuildwheel/windows.py | 2 ++ test/utils.py | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 0058c2db..257117c8 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -58,26 +58,31 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.6', identifier='cp36-manylinux_x86_64', path='/opt/python/cp36-cp36m'), PythonConfiguration(version='3.7', identifier='cp37-manylinux_x86_64', path='/opt/python/cp37-cp37m'), PythonConfiguration(version='3.8', identifier='cp38-manylinux_x86_64', path='/opt/python/cp38-cp38'), + PythonConfiguration(version='3.9', identifier='cp39-manylinux_x86_64', path='/opt/python/cp39-cp39'), PythonConfiguration(version='2.7', identifier='cp27-manylinux_i686', path='/opt/python/cp27-cp27m'), PythonConfiguration(version='2.7', identifier='cp27-manylinux_i686', path='/opt/python/cp27-cp27mu'), PythonConfiguration(version='3.5', identifier='cp35-manylinux_i686', path='/opt/python/cp35-cp35m'), PythonConfiguration(version='3.6', identifier='cp36-manylinux_i686', path='/opt/python/cp36-cp36m'), PythonConfiguration(version='3.7', identifier='cp37-manylinux_i686', path='/opt/python/cp37-cp37m'), PythonConfiguration(version='3.8', identifier='cp38-manylinux_i686', path='/opt/python/cp38-cp38'), + PythonConfiguration(version='3.9', identifier='cp39-manylinux_i686', path='/opt/python/cp39-cp39'), PythonConfiguration(version='2.7', identifier='pp27-manylinux_x86_64', path='/opt/python/pp27-pypy_73'), PythonConfiguration(version='3.6', identifier='pp36-manylinux_x86_64', path='/opt/python/pp36-pypy36_pp73'), PythonConfiguration(version='3.5', identifier='cp35-manylinux_aarch64', path='/opt/python/cp35-cp35m'), PythonConfiguration(version='3.6', identifier='cp36-manylinux_aarch64', path='/opt/python/cp36-cp36m'), PythonConfiguration(version='3.7', identifier='cp37-manylinux_aarch64', path='/opt/python/cp37-cp37m'), PythonConfiguration(version='3.8', identifier='cp38-manylinux_aarch64', path='/opt/python/cp38-cp38'), + PythonConfiguration(version='3.9', identifier='cp39-manylinux_aarch64', path='/opt/python/cp39-cp39'), PythonConfiguration(version='3.5', identifier='cp35-manylinux_ppc64le', path='/opt/python/cp35-cp35m'), PythonConfiguration(version='3.6', identifier='cp36-manylinux_ppc64le', path='/opt/python/cp36-cp36m'), PythonConfiguration(version='3.7', identifier='cp37-manylinux_ppc64le', path='/opt/python/cp37-cp37m'), PythonConfiguration(version='3.8', identifier='cp38-manylinux_ppc64le', path='/opt/python/cp38-cp38'), + PythonConfiguration(version='3.9', identifier='cp39-manylinux_ppc64le', path='/opt/python/cp39-cp39'), PythonConfiguration(version='3.5', identifier='cp35-manylinux_s390x', path='/opt/python/cp35-cp35m'), PythonConfiguration(version='3.6', identifier='cp36-manylinux_s390x', path='/opt/python/cp36-cp36m'), PythonConfiguration(version='3.7', identifier='cp37-manylinux_s390x', path='/opt/python/cp37-cp37m'), PythonConfiguration(version='3.8', identifier='cp38-manylinux_s390x', path='/opt/python/cp38-cp38'), + PythonConfiguration(version='3.9', identifier='cp39-manylinux_s390x', path='/opt/python/cp39-cp39'), ] # skip builds as required return [c for c in python_configurations if matches_platform(c.identifier) and build_selector(c.identifier)] diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 69a06c04..f31fbc13 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -43,6 +43,7 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.6', identifier='cp36-macosx_x86_64', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg'), PythonConfiguration(version='3.7', identifier='cp37-macosx_x86_64', url='https://www.python.org/ftp/python/3.7.7/python-3.7.7-macosx10.9.pkg'), PythonConfiguration(version='3.8', identifier='cp38-macosx_x86_64', url='https://www.python.org/ftp/python/3.8.3/python-3.8.3-macosx10.9.pkg'), + PythonConfiguration(version='3.9', identifier='cp39-macosx_x86_64', url='https://www.python.org/ftp/python/3.9.0/python-3.9.0b3-macosx10.9.pkg'), # PyPy PythonConfiguration(version='2.7', identifier='pp27-macosx_x86_64', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-osx64.tar.bz2'), PythonConfiguration(version='3.6', identifier='pp36-macosx_x86_64', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-osx64.tar.bz2'), diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index c625b39a..fe535350 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -55,6 +55,8 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.7.7', arch='64', identifier='cp37-win_amd64', url=None), PythonConfiguration(version='3.8.3', arch='32', identifier='cp38-win32', url=None), PythonConfiguration(version='3.8.3', arch='64', identifier='cp38-win_amd64', url=None), + PythonConfiguration(version='3.9.0-b3', arch='32', identifier='cp39-win32', url=None), + PythonConfiguration(version='3.9.0-b3', arch='64', identifier='cp39-win_amd64', url=None), # PyPy PythonConfiguration(version='2.7', arch='32', identifier='pp27-win32', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-win32.zip'), PythonConfiguration(version='3.6', arch='32', identifier='pp36-win32', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-win32.zip'), diff --git a/test/utils.py b/test/utils.py index 15ce402a..ce146e8b 100644 --- a/test/utils.py +++ b/test/utils.py @@ -90,7 +90,7 @@ def expected_wheels(package_name, package_version, manylinux_versions=None, else: manylinux_versions = ['manylinux2014'] - python_abi_tags = ['cp35-cp35m', 'cp36-cp36m', 'cp37-cp37m', 'cp38-cp38'] + python_abi_tags = ['cp35-cp35m', 'cp36-cp36m', 'cp37-cp37m', 'cp38-cp38', 'cp39-cp39'] if pm.machine() in ['x86_64', 'AMD64', 'x86']: python_abi_tags += ['cp27-cp27m', 'pp27-pypy_73', 'pp36-pypy36_pp73'] From 03ae918ec5fe64631c25b750d9a0003fe2d7c556 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Tue, 16 Jun 2020 18:10:17 +0200 Subject: [PATCH 02/22] Update manylinux docker image versions --- .../resources/pinned_docker_images.cfg | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 534d350b..3184e923 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,22 +1,22 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-05-25-b56702d -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-05-20-c7bbd11 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-05-17-2f8ac3b +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-06-08-eb1c4cf +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-06-10-41cc63f +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-06-08-69e9e1a [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-05-25-b56702d -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-05-20-c7bbd11 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-05-17-2f8ac3b +manylinux1 = quay.io/pypa/manylinux1_i686:2020-06-08-eb1c4cf +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-06-10-41cc63f +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-06-08-69e9e1a [pypy_x86_64] manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-04-25-eb2cdff [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-05-17-2f8ac3b +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-06-08-69e9e1a [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-05-17-2f8ac3b +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-06-08-69e9e1a [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-05-17-2f8ac3b +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-05-30-73c9395 From 5a6f35fe769348277554064c0e0cb253fd2d2328 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Tue, 16 Jun 2020 18:38:18 +0200 Subject: [PATCH 03/22] Skip Python 3.9 in test_docker_images.py until dockcross catches up --- test/test_docker_images.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_docker_images.py b/test/test_docker_images.py index f101c4fd..ddc6032b 100644 --- a/test/test_docker_images.py +++ b/test/test_docker_images.py @@ -32,10 +32,10 @@ def test(tmp_path): actual_wheels = utils.cibuildwheel_run(project_dir, add_env={ 'CIBW_MANYLINUX_X86_64_IMAGE': 'dockcross/manylinux2010-x64', 'CIBW_MANYLINUX_I686_IMAGE': 'dockcross/manylinux2010-x86', - 'CIBW_SKIP': 'pp*', + 'CIBW_SKIP': 'pp* cp39-*', }) # also check that we got the right wheels built expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0') - if '-pp' not in w] + if '-pp' not in w and '-cp39-' not in w] assert set(actual_wheels) == set(expected_wheels) From 29b25a3ab6fed4061ed129f39551caed5a338fa9 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Thu, 18 Jun 2020 23:49:14 +0200 Subject: [PATCH 04/22] Update manylinux docker image versions, again --- cibuildwheel/resources/pinned_docker_images.cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 3184e923..533a8fbc 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,21 +1,21 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-06-08-eb1c4cf -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-06-10-41cc63f -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-06-08-69e9e1a +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-06-18-0eb93b9 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-06-16-1ee6b68 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-06-18-f5da004 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-06-08-eb1c4cf -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-06-10-41cc63f -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-06-08-69e9e1a +manylinux1 = quay.io/pypa/manylinux1_i686:2020-06-18-0eb93b9 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-06-16-1ee6b68 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-06-18-f5da004 [pypy_x86_64] manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-04-25-eb2cdff [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-06-08-69e9e1a +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-06-18-f5da004 [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-06-08-69e9e1a +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-06-18-f5da004 [s390x] manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-05-30-73c9395 From 472eb898edb48dbcf62686fe9f60b91ef02384e0 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 5 Jul 2020 11:02:18 +0200 Subject: [PATCH 05/22] Update dependencies to get python 3.9 support on s390x --- .../resources/pinned_docker_images.cfg | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 533a8fbc..89bc55a3 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,22 +1,22 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-06-18-0eb93b9 -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-06-16-1ee6b68 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-06-18-f5da004 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-07-04-283458f +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-07-04-10a3c30 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-07-04-bb5f087 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-06-18-0eb93b9 -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-06-16-1ee6b68 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-06-18-f5da004 +manylinux1 = quay.io/pypa/manylinux1_i686:2020-07-04-283458f +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-07-04-10a3c30 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-07-04-bb5f087 [pypy_x86_64] -manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-04-25-eb2cdff +manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-07-02-fd8c128 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-06-18-f5da004 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-07-04-bb5f087 [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-06-18-f5da004 +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-07-04-bb5f087 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-05-30-73c9395 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-07-04-bb5f087 From 1059249f4d3072309d379d9104be060c0b256dd0 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 3 Aug 2020 17:45:27 +0100 Subject: [PATCH 06/22] Update to Python 3.9.0b5 --- cibuildwheel/macos.py | 2 +- .../resources/pinned_docker_images.cfg | 18 +++++++++--------- cibuildwheel/windows.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index eec3c6c9..670b1a4b 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -38,7 +38,7 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.6', identifier='cp36-macosx_x86_64', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg'), PythonConfiguration(version='3.7', identifier='cp37-macosx_x86_64', url='https://www.python.org/ftp/python/3.7.8/python-3.7.8-macosx10.9.pkg'), PythonConfiguration(version='3.8', identifier='cp38-macosx_x86_64', url='https://www.python.org/ftp/python/3.8.4/python-3.8.4-macosx10.9.pkg'), - PythonConfiguration(version='3.9', identifier='cp39-macosx_x86_64', url='https://www.python.org/ftp/python/3.9.0/python-3.9.0b3-macosx10.9.pkg'), + PythonConfiguration(version='3.9', identifier='cp39-macosx_x86_64', url='https://www.python.org/ftp/python/3.9.0/python-3.9.0b5-macosx10.9.pkg'), # PyPy PythonConfiguration(version='2.7', identifier='pp27-macosx_x86_64', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-osx64.tar.bz2'), PythonConfiguration(version='3.6', identifier='pp36-macosx_x86_64', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-osx64.tar.bz2'), diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 89bc55a3..4d4fb488 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,22 +1,22 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-07-04-283458f -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-07-04-10a3c30 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-07-04-bb5f087 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-07-31-1844b89 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-07-31-121d077 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-08-03-bb4aa00 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-07-04-283458f -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-07-04-10a3c30 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-07-04-bb5f087 +manylinux1 = quay.io/pypa/manylinux1_i686:2020-07-31-1844b89 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-07-31-121d077 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-08-03-bb4aa00 [pypy_x86_64] manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-07-02-fd8c128 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-07-04-bb5f087 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-08-03-bb4aa00 [ppc64le] -manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-07-04-bb5f087 +manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-08-03-bb4aa00 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-07-04-bb5f087 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-08-03-bb4aa00 diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 48c7c794..e82362f3 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -58,8 +58,8 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.7.8', arch='64', identifier='cp37-win_amd64', url=None), PythonConfiguration(version='3.8.4', arch='32', identifier='cp38-win32', url=None), PythonConfiguration(version='3.8.4', arch='64', identifier='cp38-win_amd64', url=None), - PythonConfiguration(version='3.9.0-b3', arch='32', identifier='cp39-win32', url=None), - PythonConfiguration(version='3.9.0-b3', arch='64', identifier='cp39-win_amd64', url=None), + PythonConfiguration(version='3.9.0-b5', arch='32', identifier='cp39-win32', url=None), + PythonConfiguration(version='3.9.0-b5', arch='64', identifier='cp39-win_amd64', url=None), # PyPy PythonConfiguration(version='2.7', arch='32', identifier='pp27-win32', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-win32.zip'), PythonConfiguration(version='3.6', arch='32', identifier='pp36-win32', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-win32.zip'), From ac3523132d6d6eee980dfe53bcc6671323a78155 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 13 Aug 2020 11:46:39 +0100 Subject: [PATCH 07/22] Add troubleshoot test --- cibuildwheel/linux.py | 4 ++-- test/test_troubleshooting.py | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 test/test_troubleshooting.py diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index a328c608..6f4698b5 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -233,7 +233,7 @@ def build(options: BuildOptions) -> None: def troubleshoot(package_dir: Path, error: Exception) -> None: - if (isinstance(error, subprocess.CalledProcessError) and 'exec' in error.cmd): + if (isinstance(error, subprocess.CalledProcessError) and error.cmd[0:2] == ['pip', 'wheel']): # the bash script failed print('Checking for common errors...') so_files = list(package_dir.glob('**/*.so')) @@ -247,7 +247,7 @@ def troubleshoot(package_dir: Path, error: Exception) -> None: If you're using Cython and have previously done an in-place build, remove those build files (*.so and *.c) before starting cibuildwheel. - ''')) + '''), file=sys.stderr) print(' Files detected:') print('\n'.join([f' {f}' for f in so_files])) diff --git a/test/test_troubleshooting.py b/test/test_troubleshooting.py new file mode 100644 index 00000000..3d07dfb5 --- /dev/null +++ b/test/test_troubleshooting.py @@ -0,0 +1,28 @@ +import subprocess +import pytest +from .test_projects import TestProject +from . import utils + +so_file_project = TestProject() + +so_file_project.files['libnothing.so'] = '' + +so_file_project.files['setup.py'] = ''' +raise Exception('this build will fail') +''' + + +def test_failed_project_with_so_files(tmp_path, capfd): + if utils.platform != 'linux': + pytest.skip('this test is only relevant to the linux build') + + project_dir = tmp_path / 'project' + so_file_project.generate(project_dir) + + with pytest.raises(subprocess.CalledProcessError): + utils.cibuildwheel_run(project_dir) + + captured = capfd.readouterr() + print('out', captured.out) + print('err', captured.err) + assert "NOTE: Shared object (.so) files found in this project." in captured.err From f19c6065738d35601137da3b2aa3769bcc8e7989 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Thu, 13 Aug 2020 11:50:17 +0100 Subject: [PATCH 08/22] Fix comment --- cibuildwheel/linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 6f4698b5..bb80fda8 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -234,7 +234,7 @@ def build(options: BuildOptions) -> None: def troubleshoot(package_dir: Path, error: Exception) -> None: if (isinstance(error, subprocess.CalledProcessError) and error.cmd[0:2] == ['pip', 'wheel']): - # the bash script failed + # the 'pip wheel' step failed. print('Checking for common errors...') so_files = list(package_dir.glob('**/*.so')) From a345008626c1b31949f90fa758e29b3c2a45e7ad Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 12 Aug 2020 20:28:27 +0200 Subject: [PATCH 09/22] Update all, except ppc64le on manylinux2014, to Python 3.9 rc1 --- cibuildwheel/macos.py | 2 +- cibuildwheel/resources/pinned_docker_images.cfg | 16 ++++++++-------- cibuildwheel/windows.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 670b1a4b..b0671f1a 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -38,7 +38,7 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.6', identifier='cp36-macosx_x86_64', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.9.pkg'), PythonConfiguration(version='3.7', identifier='cp37-macosx_x86_64', url='https://www.python.org/ftp/python/3.7.8/python-3.7.8-macosx10.9.pkg'), PythonConfiguration(version='3.8', identifier='cp38-macosx_x86_64', url='https://www.python.org/ftp/python/3.8.4/python-3.8.4-macosx10.9.pkg'), - PythonConfiguration(version='3.9', identifier='cp39-macosx_x86_64', url='https://www.python.org/ftp/python/3.9.0/python-3.9.0b5-macosx10.9.pkg'), + PythonConfiguration(version='3.9', identifier='cp39-macosx_x86_64', url='https://www.python.org/ftp/python/3.9.0/python-3.9.0rc1-macosx10.9.pkg'), # PyPy PythonConfiguration(version='2.7', identifier='pp27-macosx_x86_64', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-osx64.tar.bz2'), PythonConfiguration(version='3.6', identifier='pp36-macosx_x86_64', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-osx64.tar.bz2'), diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 4d4fb488..8f2d0e28 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,22 +1,22 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-07-31-1844b89 -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-07-31-121d077 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-08-03-bb4aa00 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-08-12-ebd07dd +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-08-12-e187883 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-08-13-1020644 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-07-31-1844b89 -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-07-31-121d077 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-08-03-bb4aa00 +manylinux1 = quay.io/pypa/manylinux1_i686:2020-08-12-ebd07dd +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-08-12-e187883 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-08-13-1020644 [pypy_x86_64] manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-07-02-fd8c128 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-08-03-bb4aa00 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-08-13-1020644 [ppc64le] manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-08-03-bb4aa00 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-08-03-bb4aa00 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-08-13-1020644 diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index e82362f3..3341ae78 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -58,8 +58,8 @@ def get_python_configurations(build_selector: BuildSelector) -> List[PythonConfi PythonConfiguration(version='3.7.8', arch='64', identifier='cp37-win_amd64', url=None), PythonConfiguration(version='3.8.4', arch='32', identifier='cp38-win32', url=None), PythonConfiguration(version='3.8.4', arch='64', identifier='cp38-win_amd64', url=None), - PythonConfiguration(version='3.9.0-b5', arch='32', identifier='cp39-win32', url=None), - PythonConfiguration(version='3.9.0-b5', arch='64', identifier='cp39-win_amd64', url=None), + PythonConfiguration(version='3.9.0-rc1', arch='32', identifier='cp39-win32', url=None), + PythonConfiguration(version='3.9.0-rc1', arch='64', identifier='cp39-win_amd64', url=None), # PyPy PythonConfiguration(version='2.7', arch='32', identifier='pp27-win32', url='https://downloads.python.org/pypy/pypy2.7-v7.3.1-win32.zip'), PythonConfiguration(version='3.6', arch='32', identifier='pp36-win32', url='https://downloads.python.org/pypy/pypy3.6-v7.3.1-win32.zip'), From 6d6d277ea5dd0356edb39a8a7f3536a86ff36832 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 14 Aug 2020 15:27:22 -0400 Subject: [PATCH 10/22] fix: pre-commit check was broken --- .pre-commit-config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 15c843f9..5d207281 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,8 +14,9 @@ repos: - id: end-of-file-fixer exclude: cibuildwheel/resources/pinned_docker_images.cfg - repo: https://github.com/pre-commit/mirrors-mypy - rev: '' # Use the sha / tag you want to point at + rev: v0.782 hooks: - id: mypy - files: cibuildwheel|test - exclude: cibuildwheel/resources + files: cibuildwheel/|test/ + entry: mypy + pass_filenames: false From 17c83ad78bda3991c90c9d0e98dcf3c1dbca7831 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 14 Aug 2020 15:46:07 -0400 Subject: [PATCH 11/22] ci: move formatting check to pre-commit + GitHub --- .circleci/config.yml | 17 ----------------- .github/workflows/test.yml | 8 ++++++++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cf0e47b2..66777904 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,22 +1,6 @@ version: 2 jobs: - flake8-mypy: - docker: - - image: circleci/python:3.6 - steps: - - checkout - - - run: - name: Install flake8 & mypy - command: sudo python -m pip install flake8 mypy - - run: - name: flake8 - command: flake8 - - run: - name: mypy - command: mypy - osx-python3.6: macos: xcode: "9.4.1" @@ -54,6 +38,5 @@ workflows: version: 2 all-tests: jobs: - - flake8-mypy - osx-python3.6 - linux-python3.6 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41c02da4..340a578f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,14 @@ on: - 'docs/**' jobs: + pre-commit: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - uses: pre-commit/action@v2.0.0 + test: # skip branch builds on joerick/cibuildwheel, but always build `master` and pull requests if: github.repository != 'joerick/cibuildwheel' || github.ref == 'refs/heads/master' || github.event_name == 'pull_request' From 448d6538d785f7dfda15eed7356c2704ee1048ac Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 14 Aug 2020 15:28:09 -0400 Subject: [PATCH 12/22] chore: run pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d207281..df546622 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,13 @@ repos: - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.1 + rev: 3.8.3 hooks: - id: flake8 pass_filenames: true # this seems to need to be here in addition to setup.cfg exclude: cibuildwheel/resources/ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v3.2.0 hooks: - id: check-yaml - id: check-merge-conflict From 45074a9b3a67f30a7ec718b347612bb846357f54 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 13 Aug 2020 20:50:36 -0400 Subject: [PATCH 13/22] fix: add extra space after ] --- cibuildwheel/windows.py | 5 ++++- test/test_pep518.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index f793acf4..4ebdf691 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -177,8 +177,11 @@ def pep_518_cp35_workaround(package_dir: Path, env: Dict[str, str]) -> None: if 'build-system' in data else [] ) + if requirements: - shell(['pip', 'install'] + requirements, env=env) + # Workaround for bug when ]>= is present, #421 + requirements = [r.replace("]", "] ") for r in requirements] + call(['pip', 'install'] + requirements, env=env) def build(options: BuildOptions) -> None: diff --git a/test/test_pep518.py b/test/test_pep518.py index 9257f7db..fe8f8174 100644 --- a/test/test_pep518.py +++ b/test/test_pep518.py @@ -27,6 +27,7 @@ basic_project.files[ [build-system] requires = [ "setuptools >= 42", + "setuptools_scm[toml]>=4.1.2", "wheel", "requests==2.22.0; python_version<'3.6'", "requests==2.23.0; python_version>='3.6'" @@ -47,3 +48,6 @@ def test_pep518(tmp_path): # check that the expected wheels are produced expected_wheels = utils.expected_wheels("spam", "0.1.0") assert set(actual_wheels) == set(expected_wheels) + + assert not (project_dir / "42").exists() + assert not (project_dir / "4.1.2").exists() From 9df68df5259345ab9e323646235cc3d0204fcaf4 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 14 Aug 2020 16:12:24 -0400 Subject: [PATCH 14/22] style: add a few more checks --- .pre-commit-config.yaml | 45 +++++++++++++++++--------------- appveyor.yml | 6 ++--- cibuildwheel/docker_container.py | 5 ++-- docs/deliver-to-pypi.md | 4 +-- docs/extra.css | 2 +- docs/index.md | 4 +-- setup.cfg | 3 ++- 7 files changed, 37 insertions(+), 32 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index df546622..a01336bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,25 @@ repos: -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 - hooks: - - id: flake8 - pass_filenames: true - # this seems to need to be here in addition to setup.cfg - exclude: cibuildwheel/resources/ -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 - hooks: - - id: check-yaml - - id: check-merge-conflict - - id: end-of-file-fixer - exclude: cibuildwheel/resources/pinned_docker_images.cfg -- repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.782 - hooks: - - id: mypy - files: cibuildwheel/|test/ - entry: mypy - pass_filenames: false +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.3 + hooks: + - id: flake8 + exclude: cibuildwheel/resources/ + additional_dependencies: [flake8-bugbear] + +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: check-case-conflict + - id: check-merge-conflict + - id: check-yaml + - id: end-of-file-fixer + exclude: cibuildwheel/resources/pinned_docker_images.cfg + - id: mixed-line-ending + - id: trailing-whitespace + +- repo: https://github.com/pre-commit/mirrors-mypy + rev: v0.782 + hooks: + - id: mypy + files: cibuildwheel/|test/ + pass_filenames: false diff --git a/appveyor.yml b/appveyor.yml index 401eeb11..5162f1b6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ environment: - # workaround an appveyor bug on macos + # workaround an appveyor bug on macos # see https://github.com/appveyor/ci/issues/3376#issuecomment-611314299 APPVEYOR_CONSOLE_DISABLE_PTY: true matrix: @@ -11,8 +11,8 @@ environment: APPVEYOR_JOB_NAME: "python37-x64-macos-mojave" # while pypy libffi dependency is failing the build, allow failures on macos -matrix: - allow_failures: +matrix: + allow_failures: - APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave stack: python 3.7 diff --git a/cibuildwheel/docker_container.py b/cibuildwheel/docker_container.py index 8c3a608b..a58eb750 100644 --- a/cibuildwheel/docker_container.py +++ b/cibuildwheel/docker_container.py @@ -117,11 +117,12 @@ class DockerContainer: return [PurePath(p) for p in path_strs] - def call(self, args: Sequence[Union[str, PathLike]], env: Dict[str, str] = {}, + def call(self, args: Sequence[Union[str, PathLike]], env: Optional[Dict[str, str]] = None, capture_output=False, cwd: Optional[Union[str, PathLike]] = None) -> str: + chdir = f'cd {cwd}' if cwd else '' env_assignments = ' '.join(f'{shlex.quote(k)}={shlex.quote(v)}' - for k, v in env.items()) + for k, v in env.items()) if env is not None else '' command = ' '.join(shlex.quote(str(a)) for a in args) end_of_message = str(uuid.uuid4()) diff --git a/docs/deliver-to-pypi.md b/docs/deliver-to-pypi.md index 5c1fb2ee..a68ba928 100644 --- a/docs/deliver-to-pypi.md +++ b/docs/deliver-to-pypi.md @@ -9,14 +9,14 @@ After you've built your wheels, you'll probably want to deliver them to PyPI. On your development machine, do the following... ```bash -# Clear out your 'dist' folder. +# Clear out your 'dist' folder. rm -rf dist # Make a source distribution python setup.py sdist # 🏃🏻 # Go and download your wheel files from wherever you put them. e.g. your CI -# provider can be configured to store them for you. Put them all into the +# provider can be configured to store them for you. Put them all into the # 'dist' folder. # Upload using 'twine' (you may need to 'pip install twine') diff --git a/docs/extra.css b/docs/extra.css index 4a965b22..5da96b0b 100644 --- a/docs/extra.css +++ b/docs/extra.css @@ -59,7 +59,7 @@ h1, h2, h3, h4, h5, h6 { background-color: #eff1f3; font-size: 85%; font-weight: bold; - + border-top-left-radius: 3px; border-top-right-radius: 3px; diff --git a/docs/index.md b/docs/index.md index cfadd421..627209b0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,9 +2,9 @@ title: Home --- -{% +{% includemarkdown "../README.md" - start="" + start="" end="" %} diff --git a/setup.cfg b/setup.cfg index e98764a2..8202be43 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,6 @@ [flake8] -ignore = E501,W503,E741,E226 +ignore = E501,W503,E741,E226,B950 +select = C,E,F,W,B,B9 application-import-names = cibuildwheel exclude = cibuildwheel/resources/, From 416c6f3a3cd39149441f3c3f63a4c4ef6bd1219c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 14 Aug 2020 14:55:08 -0400 Subject: [PATCH 15/22] fix: file method of requirement installs --- cibuildwheel/windows.py | 9 ++++++--- test/test_pep518.py | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 4ebdf691..151f8a30 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -179,9 +179,12 @@ def pep_518_cp35_workaround(package_dir: Path, env: Dict[str, str]) -> None: ) if requirements: - # Workaround for bug when ]>= is present, #421 - requirements = [r.replace("]", "] ") for r in requirements] - call(['pip', 'install'] + requirements, env=env) + with tempfile.TemporaryDirectory() as d: + reqfile = Path(d) / "requirements.txt" + with reqfile.open("w") as f: + for r in requirements: + print(r, file=f) + call(['pip', 'install', '-r', str(reqfile)], env=env) def build(options: BuildOptions) -> None: diff --git a/test/test_pep518.py b/test/test_pep518.py index fe8f8174..58ed2c71 100644 --- a/test/test_pep518.py +++ b/test/test_pep518.py @@ -1,6 +1,7 @@ import textwrap from . import test_projects from . import utils +import os basic_project = test_projects.new_c_project( setup_py_add=textwrap.dedent( @@ -51,3 +52,5 @@ def test_pep518(tmp_path): assert not (project_dir / "42").exists() assert not (project_dir / "4.1.2").exists() + + assert len(os.listdir(project_dir)) == len(basic_project.files) From fd2b5d3270fd2544639d3c28b1eb32198dd0244b Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sun, 16 Aug 2020 14:05:39 -0400 Subject: [PATCH 16/22] refactor: minor tweaks from @joerick --- cibuildwheel/windows.py | 2 +- test/test_pep518.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 151f8a30..bca658c0 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -184,7 +184,7 @@ def pep_518_cp35_workaround(package_dir: Path, env: Dict[str, str]) -> None: with reqfile.open("w") as f: for r in requirements: print(r, file=f) - call(['pip', 'install', '-r', str(reqfile)], env=env) + call(['pip', 'install', '-r', reqfile], env=env) def build(options: BuildOptions) -> None: diff --git a/test/test_pep518.py b/test/test_pep518.py index 58ed2c71..77482f93 100644 --- a/test/test_pep518.py +++ b/test/test_pep518.py @@ -50,6 +50,8 @@ def test_pep518(tmp_path): expected_wheels = utils.expected_wheels("spam", "0.1.0") assert set(actual_wheels) == set(expected_wheels) + # These checks ensure an extra file is not created when using custom + # workaround; see https://github.com/joerick/cibuildwheel/issues/421 assert not (project_dir / "42").exists() assert not (project_dir / "4.1.2").exists() From a0d67a7a90df2d6d340a625c9b1ae04012d25ac4 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sun, 16 Aug 2020 14:15:28 -0400 Subject: [PATCH 17/22] ci: suggestion from @joerick Co-authored-by: Joe Rickerby --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 340a578f..9e4eea1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: jobs: pre-commit: - name: Format + name: Pre-commit checks (mypy, flake8, etc.) runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From fbb4e28b44fd7d5080d303db20a06364d4fba739 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Fri, 28 Aug 2020 01:52:04 +0200 Subject: [PATCH 18/22] Add section to the docs' FAQ about VC++ runtimes and VCRUNTIME140_1.dll on VS2019 --- docs/faq.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index 6f32da3f..8417f9fa 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -61,3 +61,11 @@ python3 -m cibuildwheel --output-dir wheelhouse python3 -m pip install twine python3 -m twine upload wheelhouse/*.whl ``` + +### 'ImportError: DLL load failed: The specific module could not be found' error on Windows + +Visual Studio and MSVC link the compiled binary wheels to the Microsoft Visual C++ Runtime. Normally, these are included with Python, but when compiling with a newer version of Visual Studio, it is possible users run into problems on system that do not have these runtime libraries installed. The solution is to download the corresponding Visual C++ Redistributable from the [Microsoft website](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads). + +Additionally, Visual Studio 2019 started linking to an even newer DLL, `VCRUNTIME140_1.dll`, besides the `VCRUNTIME140.dll` that is included with recent Python versions (starting from Python 3.5; see [here](https://wiki.python.org/moin/WindowsCompilers) for more details on the corresponding Visual Studio & MSVC versions used to compile the diffent Python versions). To avoid this extra dependency on `VCRUNTIME140_1.dll`, the [`/d2FH4-` flag](https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/) can be added to the MSVC invocations (check out [this issue](https://github.com/joerick/cibuildwheel/issues/423) for details and references). + +To investigate the dependecies of a C extension (i.e., the `.pyd` file, a DLL in disguise) on Windows, [Dependency Walker](http://www.dependencywalker.com/) is a great tool. From e0dd32dea854501bf00572e7b473cef54563e631 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Fri, 28 Aug 2020 16:16:14 +0200 Subject: [PATCH 19/22] Extend explanation about versions of Python and versions of VC++ redistributable files --- docs/faq.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 8417f9fa..17e6262e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -64,8 +64,20 @@ python3 -m twine upload wheelhouse/*.whl ### 'ImportError: DLL load failed: The specific module could not be found' error on Windows -Visual Studio and MSVC link the compiled binary wheels to the Microsoft Visual C++ Runtime. Normally, these are included with Python, but when compiling with a newer version of Visual Studio, it is possible users run into problems on system that do not have these runtime libraries installed. The solution is to download the corresponding Visual C++ Redistributable from the [Microsoft website](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads). +Visual Studio and MSVC link the compiled binary wheels to the Microsoft Visual C++ Runtime. Normally, these are included with Python, but when compiling with a newer version of Visual Studio, it is possible users will run into problems on systems that do not have these runtime libraries installed. The solution is to ask users to download the corresponding Visual C++ Redistributable from the [Microsoft website](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) and install it. Since a Python installation normally includes these VC++ Redistributable files for [the version of the MSVC compiler used to compile Python](https://wiki.python.org/moin/WindowsCompilers), this is typically only a problem when compiling a Python 2.7 C extension with a newer compiler, e.g. to support a modern C++ standard (see [the section on modern C++ standards for Python 2.7](cpp_standards.md#windows-and-python-27) for more details). Additionally, Visual Studio 2019 started linking to an even newer DLL, `VCRUNTIME140_1.dll`, besides the `VCRUNTIME140.dll` that is included with recent Python versions (starting from Python 3.5; see [here](https://wiki.python.org/moin/WindowsCompilers) for more details on the corresponding Visual Studio & MSVC versions used to compile the diffent Python versions). To avoid this extra dependency on `VCRUNTIME140_1.dll`, the [`/d2FH4-` flag](https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/) can be added to the MSVC invocations (check out [this issue](https://github.com/joerick/cibuildwheel/issues/423) for details and references). +To add the `/d2FH4-` flag to a standard `setup.py` using `setuptools`, the `extra_compile_args` option can be used: + +```python + ext_modules=[ + Extension( + 'c_module', + sources=['extension.c'], + extra_compile_args=['/d2FH4-'] if sys.platform == 'win32' else [] + ) + ], +``` + To investigate the dependecies of a C extension (i.e., the `.pyd` file, a DLL in disguise) on Windows, [Dependency Walker](http://www.dependencywalker.com/) is a great tool. From b448271640dd9c2e0536ea0a9801980505f8f94c Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Fri, 28 Aug 2020 17:05:48 +0200 Subject: [PATCH 20/22] Fix typos --- docs/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 17e6262e..2ff777f6 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -66,7 +66,7 @@ python3 -m twine upload wheelhouse/*.whl Visual Studio and MSVC link the compiled binary wheels to the Microsoft Visual C++ Runtime. Normally, these are included with Python, but when compiling with a newer version of Visual Studio, it is possible users will run into problems on systems that do not have these runtime libraries installed. The solution is to ask users to download the corresponding Visual C++ Redistributable from the [Microsoft website](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) and install it. Since a Python installation normally includes these VC++ Redistributable files for [the version of the MSVC compiler used to compile Python](https://wiki.python.org/moin/WindowsCompilers), this is typically only a problem when compiling a Python 2.7 C extension with a newer compiler, e.g. to support a modern C++ standard (see [the section on modern C++ standards for Python 2.7](cpp_standards.md#windows-and-python-27) for more details). -Additionally, Visual Studio 2019 started linking to an even newer DLL, `VCRUNTIME140_1.dll`, besides the `VCRUNTIME140.dll` that is included with recent Python versions (starting from Python 3.5; see [here](https://wiki.python.org/moin/WindowsCompilers) for more details on the corresponding Visual Studio & MSVC versions used to compile the diffent Python versions). To avoid this extra dependency on `VCRUNTIME140_1.dll`, the [`/d2FH4-` flag](https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/) can be added to the MSVC invocations (check out [this issue](https://github.com/joerick/cibuildwheel/issues/423) for details and references). +Additionally, Visual Studio 2019 started linking to an even newer DLL, `VCRUNTIME140_1.dll`, besides the `VCRUNTIME140.dll` that is included with recent Python versions (starting from Python 3.5; see [here](https://wiki.python.org/moin/WindowsCompilers) for more details on the corresponding Visual Studio & MSVC versions used to compile the different Python versions). To avoid this extra dependency on `VCRUNTIME140_1.dll`, the [`/d2FH4-` flag](https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/) can be added to the MSVC invocations (check out [this issue](https://github.com/joerick/cibuildwheel/issues/423) for details and references). To add the `/d2FH4-` flag to a standard `setup.py` using `setuptools`, the `extra_compile_args` option can be used: @@ -80,4 +80,4 @@ To add the `/d2FH4-` flag to a standard `setup.py` using `setuptools`, the `extr ], ``` -To investigate the dependecies of a C extension (i.e., the `.pyd` file, a DLL in disguise) on Windows, [Dependency Walker](http://www.dependencywalker.com/) is a great tool. +To investigate the dependencies of a C extension (i.e., the `.pyd` file, a DLL in disguise) on Windows, [Dependency Walker](http://www.dependencywalker.com/) is a great tool. From 28de36ea6f2eb8c532dd9cd63dce58e39471c27b Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Sun, 6 Sep 2020 23:54:47 +0200 Subject: [PATCH 21/22] Adapt README to fully support Python 3.9 --- README.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e149eb99..07241682 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,19 @@ What does it do? | | macOS x86_64 | Windows 64bit | Windows 32bit | manylinux x86_64 | manylinux i686 | manylinux aarch64 | manylinux ppc64le | manylinux s390x | |---|---|---|---|---|---|---|---|---| -| CPython 2.7 | ✅ | ✅¹ | ✅¹ | ✅ | ✅ | | | | -| CPython 3.5 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | -| CPython 3.6 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | -| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | -| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | -| CPython 3.9³ | 🛠 | 🛠 | 🛠 | 🛠 | 🛠 | 🛠 | 🛠 | | -| PyPy 2.7 v7.3.0 | ✅ | | ✅ | ✅ | | | | | -| PyPy 3.6 v7.3.0 | ✅ | | ✅ | ✅ | | | | | +| CPython 2.7 | ✅ | ✅¹ | ✅¹ | ✅ | ✅ | | | | +| CPython 3.5 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅² | ✅³ | +| CPython 3.6 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅² | ✅³ | +| CPython 3.7 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅² | ✅³ | +| CPython 3.8 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅² | ✅³ | +| CPython 3.9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅² | ✅⁴ | ✅³ | +| PyPy 2.7 v7.3.0 | ✅ | | ✅ | ✅ | | | | | +| PyPy 3.6 v7.3.0 | ✅ | | ✅ | ✅ | | | | | ¹ Not supported on Travis
-² Beta support until Travis CI fixes a bug
-³ Python 3.9 is not yet ABI stable, so you shouldn't publish wheels with it yet. But if you want to check that your wheels build on Python 3.9, try our [`python3.9` branch](https://github.com/joerick/cibuildwheel/pull/382)! +² Only supported on Travis
+³ Beta support until Travis CI fixes a bug
+⁴ Only Python 3.9 beta 3 is supported, until a bug in building the manylinux2014 is fixed
- Builds manylinux, macOS and Windows wheels for CPython and PyPy using Azure Pipelines, Travis CI, AppVeyor, and CircleCI - Bundles shared library dependencies on Linux and macOS through [auditwheel](https://github.com/pypa/auditwheel) and [delocate](https://github.com/matthew-brett/delocate) From 2a62198b478b1e1d26d3edbb1dc9238147c2770c Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Sun, 6 Sep 2020 23:56:21 +0200 Subject: [PATCH 22/22] Update docker images again --- cibuildwheel/resources/pinned_docker_images.cfg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cibuildwheel/resources/pinned_docker_images.cfg b/cibuildwheel/resources/pinned_docker_images.cfg index 8f2d0e28..1f437520 100644 --- a/cibuildwheel/resources/pinned_docker_images.cfg +++ b/cibuildwheel/resources/pinned_docker_images.cfg @@ -1,22 +1,22 @@ [x86_64] -manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-08-12-ebd07dd -manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-08-12-e187883 -manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-08-13-1020644 +manylinux1 = quay.io/pypa/manylinux1_x86_64:2020-08-20-a535ba4 +manylinux2010 = quay.io/pypa/manylinux2010_x86_64:2020-08-20-df89e22 +manylinux2014 = quay.io/pypa/manylinux2014_x86_64:2020-08-29-f97fd86 [i686] -manylinux1 = quay.io/pypa/manylinux1_i686:2020-08-12-ebd07dd -manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-08-12-e187883 -manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-08-13-1020644 +manylinux1 = quay.io/pypa/manylinux1_i686:2020-08-20-a535ba4 +manylinux2010 = quay.io/pypa/manylinux2010_i686:2020-08-20-df89e22 +manylinux2014 = quay.io/pypa/manylinux2014_i686:2020-08-29-f97fd86 [pypy_x86_64] manylinux2010 = pypywheels/manylinux2010-pypy_x86_64:2020-07-02-fd8c128 [aarch64] -manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-08-13-1020644 +manylinux2014 = quay.io/pypa/manylinux2014_aarch64:2020-08-29-f97fd86 [ppc64le] manylinux2014 = quay.io/pypa/manylinux2014_ppc64le:2020-08-03-bb4aa00 [s390x] -manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-08-13-1020644 +manylinux2014 = quay.io/pypa/manylinux2014_s390x:2020-08-29-f97fd86