Compare commits

...
7 Commits
Author SHA1 Message Date
Joe Rickerby 1e16497776 Bump version: v1.6.3 2020-10-12 21:05:20 +01:00
Joe Rickerby 39ea08469c Add merged PRs shortcut 2020-10-12 21:00:46 +01:00
Joe Rickerby 441a98f054 Merge pull request #448 from Czaki/dependency_constraints_str
Add str representation to DependencyConstraints
2020-10-11 10:42:30 +01:00
Joe Rickerby 7664768b8e Merge pull request #449 from mayeut/macos-update-ssl-patch
Update openssl patch from 1.0.2u to 1.1.1h on macOS
2020-10-11 10:41:58 +01:00
mayeut b2c4f3d385 Update openssl patch from 1.0.2u to 1.1.1h on macOS
- Update openssl patch from 1.0.2u to 1.1.1h on macOS
- Remove python 3.5 workaround in install_certifi.py
2020-10-10 18:55:26 +02:00
8094b3f6db Update macOS SSL certificates (#447)
Update macOS SSL certificates using latest `certifi` certificate bundle.

Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
2020-10-10 18:24:15 +02:00
Grzegorz Bokota d781111941 add str representation to DependencyConstraints 2020-10-09 23:10:44 +02:00
16 changed files with 107 additions and 25 deletions
+8 -1
View File
@@ -85,7 +85,7 @@ env:
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings # Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
install: install:
- python3 -m pip install cibuildwheel==1.6.2 - python3 -m pip install cibuildwheel==1.6.3
script: script:
# build the wheels, put them into './wheelhouse' # build the wheels, put them into './wheelhouse'
@@ -162,6 +162,13 @@ This is similar to static linking, so it might have some licence implications. C
Changelog Changelog
========= =========
### 1.6.3
_12 October 2020_
- 🐛 Fix missing SSL certificates on macOS (#447)
- 🛠 Update OpenSSL Python 3.5 patch to 1.1.1h on macOS (#449)
### 1.6.2 ### 1.6.2
_9 October 2020_ _9 October 2020_
+19
View File
@@ -7,6 +7,7 @@ import cibuildwheel
from packaging.version import Version, InvalidVersion from packaging.version import Version, InvalidVersion
import subprocess import subprocess
import glob import glob
import urllib.parse
config = [ config = [
# file path, version find/replace format # file path, version find/replace format
@@ -87,6 +88,24 @@ def bump_version():
print('Files updated. If you want to update the changelog as part of this') print('Files updated. If you want to update the changelog as part of this')
print('commit, do that now.') print('commit, do that now.')
print()
try:
commit_date_str = subprocess.run([
'git',
'show', '-s', '--pretty=format:%ci',
f'v{current_version}^{{commit}}'
], check=True, capture_output=True, encoding='utf8').stdout
commit_date_parts = commit_date_str.split(' ')
url = 'https://github.com/joerick/cibuildwheel/pulls?' + urllib.parse.urlencode({
'q': f'is:pr merged:>{commit_date_parts[0]}T{commit_date_parts[1]}{commit_date_parts[2]}',
})
print(f'PRs merged since last release:\n {url}')
print()
except subprocess.CalledProcessError as e:
print(e)
print('Failed to get previous version tag information.')
while input('Type "done" to continue: ').strip().lower() != 'done': while input('Type "done" to continue: ').strip().lower() != 'done':
pass pass
+1 -1
View File
@@ -1 +1 @@
__version__ = '1.6.2' __version__ = '1.6.3'
+7 -4
View File
@@ -11,7 +11,7 @@ from typing import Dict, List, NamedTuple, Optional, Sequence, Union
from .environment import ParsedEnvironment from .environment import ParsedEnvironment
from .util import (BuildOptions, BuildSelector, NonPlatformWheelError, download, from .util import (BuildOptions, BuildSelector, NonPlatformWheelError, download,
get_build_verbosity_extra_flags, get_pip_script, get_build_verbosity_extra_flags, get_pip_script,
prepare_command) prepare_command, install_certifi_script)
def call(args: Union[str, Sequence[Union[str, PathLike]]], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int: def call(args: Union[str, Sequence[Union[str, PathLike]]], env: Optional[Dict[str, str]] = None, cwd: Optional[str] = None, shell: bool = False) -> int:
@@ -72,6 +72,9 @@ def install_cpython(version: str, url: str) -> Path:
# if this version of python isn't installed, get it from python.org and install # if this version of python isn't installed, get it from python.org and install
python_package_identifier = f'org.python.Python.PythonFramework-{version}' python_package_identifier = f'org.python.Python.PythonFramework-{version}'
python_executable = 'python3' if version[0] == '3' else 'python'
installation_bin_path = Path(f'/Library/Frameworks/Python.framework/Versions/{version}/bin')
if python_package_identifier not in installed_system_packages: if python_package_identifier not in installed_system_packages:
# download the pkg # download the pkg
download(url, Path('/tmp/Python.pkg')) download(url, Path('/tmp/Python.pkg'))
@@ -79,12 +82,12 @@ def install_cpython(version: str, url: str) -> Path:
call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/']) call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])
# patch open ssl # patch open ssl
if version == '3.5': if version == '3.5':
open_ssl_patch_url = f'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2u/patch-macos-python-{version}-openssl-v1.0.2u.tar.gz' open_ssl_patch_url = f'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.1.1h/patch-macos-python-{version}-openssl-v1.1.1h.tar.gz'
download(open_ssl_patch_url, Path('/tmp/python-patch.tar.gz')) download(open_ssl_patch_url, Path('/tmp/python-patch.tar.gz'))
call(['sudo', 'tar', '-C', f'/Library/Frameworks/Python.framework/Versions/{version}/', '-xmf', '/tmp/python-patch.tar.gz']) call(['sudo', 'tar', '-C', f'/Library/Frameworks/Python.framework/Versions/{version}/', '-xmf', '/tmp/python-patch.tar.gz'])
installation_bin_path = Path(f'/Library/Frameworks/Python.framework/Versions/{version}/bin') call(["sudo", str(installation_bin_path/python_executable), str(install_certifi_script)])
python_executable = 'python3' if version[0] == '3' else 'python'
pip_executable = 'pip3' if version[0] == '3' else 'pip' pip_executable = 'pip3' if version[0] == '3' else 'pip'
make_symlinks(installation_bin_path, python_executable, pip_executable) make_symlinks(installation_bin_path, python_executable, pip_executable)
+50
View File
@@ -0,0 +1,50 @@
# Based on: https://github.com/python/cpython/blob/master/Mac/BuildScript/resources/install_certificates.command
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.org/project/certifi/
import os
import os.path
import ssl
import stat
import subprocess
import sys
STAT_0o775 = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR
| stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP
| stat.S_IROTH | stat.S_IXOTH)
if sys.version_info[0] == 2:
FileNotFoundError = OSError
def main():
openssl_dir, openssl_cafile = os.path.split(
ssl.get_default_verify_paths().openssl_cafile)
print(" -- pip install --upgrade certifi")
subprocess.check_call([sys.executable,
"-E", "-s", "-m", "pip", "install", "--upgrade", "certifi"])
import certifi
# change working directory to the default SSL directory
os.chdir(openssl_dir)
relpath_to_certifi_cafile = os.path.relpath(certifi.where())
print(" -- removing any existing file or link")
try:
os.remove(openssl_cafile)
except FileNotFoundError:
pass
print(" -- creating symlink to certifi certificate bundle")
os.symlink(relpath_to_certifi_cafile, openssl_cafile)
print(" -- setting permissions")
os.chmod(openssl_cafile, STAT_0o775)
print(" -- update complete")
if __name__ == '__main__':
main()
+4
View File
@@ -107,6 +107,9 @@ class DependencyConstraints:
else: else:
return self.base_file_path return self.base_file_path
def __str__(self):
return f"File '{self.base_file_path}'"
class BuildOptions(NamedTuple): class BuildOptions(NamedTuple):
package_dir: Path package_dir: Path
@@ -127,6 +130,7 @@ class BuildOptions(NamedTuple):
resources_dir = Path(__file__).resolve().parent / 'resources' resources_dir = Path(__file__).resolve().parent / 'resources'
get_pip_script = resources_dir / 'get-pip.py' get_pip_script = resources_dir / 'get-pip.py'
install_certifi_script = resources_dir / "install_certifi.py"
class NonPlatformWheelError(Exception): class NonPlatformWheelError(Exception):
+1 -1
View File
@@ -12,7 +12,7 @@ stack: python 3.7
init: init:
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH% - cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
install: python -m pip install cibuildwheel==1.6.2 install: python -m pip install cibuildwheel==1.6.3
build_script: python -m cibuildwheel --output-dir wheelhouse build_script: python -m cibuildwheel --output-dir wheelhouse
+3 -3
View File
@@ -5,7 +5,7 @@ jobs:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
- bash: | - bash: |
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
pip3 install cibuildwheel==1.6.2 pip3 install cibuildwheel==1.6.3
cibuildwheel --output-dir wheelhouse . cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'} inputs: {pathtoPublish: 'wheelhouse'}
@@ -16,7 +16,7 @@ jobs:
- task: UsePythonVersion@0 - task: UsePythonVersion@0
- bash: | - bash: |
python3 -m pip install --upgrade pip python3 -m pip install --upgrade pip
pip3 install cibuildwheel==1.6.2 pip3 install cibuildwheel==1.6.3
cibuildwheel --output-dir wheelhouse . cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'} inputs: {pathtoPublish: 'wheelhouse'}
@@ -29,7 +29,7 @@ jobs:
displayName: Install Visual C++ for Python 2.7 displayName: Install Visual C++ for Python 2.7
- bash: | - bash: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install cibuildwheel==1.6.2 pip install cibuildwheel==1.6.3
cibuildwheel --output-dir wheelhouse . cibuildwheel --output-dir wheelhouse .
- task: PublishBuildArtifacts@1 - task: PublishBuildArtifacts@1
inputs: {pathtoPublish: 'wheelhouse'} inputs: {pathtoPublish: 'wheelhouse'}
+2 -2
View File
@@ -11,7 +11,7 @@ jobs:
- run: - run:
name: Build the Linux wheels. name: Build the Linux wheels.
command: | command: |
pip3 install --user cibuildwheel==1.6.2 pip3 install --user cibuildwheel==1.6.3
cibuildwheel --output-dir wheelhouse cibuildwheel --output-dir wheelhouse
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
@@ -26,7 +26,7 @@ jobs:
- run: - run:
name: Build the OS X wheels. name: Build the OS X wheels.
command: | command: |
pip3 install cibuildwheel==1.6.2 pip3 install cibuildwheel==1.6.3
cibuildwheel --output-dir wheelhouse cibuildwheel --output-dir wheelhouse
- store_artifacts: - store_artifacts:
path: wheelhouse/ path: wheelhouse/
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
- name: Install cibuildwheel - name: Install cibuildwheel
run: | run: |
python -m pip install cibuildwheel==1.6.2 python -m pip install cibuildwheel==1.6.3
- name: Install Visual C++ for Python 2.7 - name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows' if: runner.os == 'Windows'
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
- name: Install cibuildwheel - name: Install cibuildwheel
run: | run: |
python -m pip install cibuildwheel==1.6.2 python -m pip install cibuildwheel==1.6.3
- name: Install Visual C++ for Python 2.7 - name: Install Visual C++ for Python 2.7
if: runner.os == 'Windows' if: runner.os == 'Windows'
+1 -1
View File
@@ -27,7 +27,7 @@ env:
# Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings # Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings
install: install:
- python3 -m pip install cibuildwheel==1.6.2 - python3 -m pip install cibuildwheel==1.6.3
script: script:
# build the wheels, put them into './wheelhouse' # build the wheels, put them into './wheelhouse'
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
- ln -s /c/Python38/python.exe /c/Python38/python3.exe - ln -s /c/Python38/python.exe /c/Python38/python3.exe
install: install:
- python3 -m pip install cibuildwheel==1.6.2 - python3 -m pip install cibuildwheel==1.6.3
script: script:
# build the wheels, put them into './wheelhouse' # build the wheels, put them into './wheelhouse'
+3 -3
View File
@@ -55,7 +55,7 @@ jobs:
- stage: deploy - stage: deploy
name: Build and deploy Linux wheels name: Build and deploy Linux wheels
services: docker services: docker
install: python3 -m pip install cibuildwheel==1.6.2 install: python3 -m pip install cibuildwheel==1.6.3
script: python3 -m cibuildwheel --output-dir wheelhouse script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: | after_success: |
python3 -m pip install twine python3 -m pip install twine
@@ -67,7 +67,7 @@ jobs:
# PyPy 7.3.2 needs macOS >= 10.14 # PyPy 7.3.2 needs macOS >= 10.14
osx_image: xcode10.2 osx_image: xcode10.2
language: shell language: shell
install: python3 -m pip install cibuildwheel==1.6.2 install: python3 -m pip install cibuildwheel==1.6.3
script: python3 -m cibuildwheel --output-dir wheelhouse script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: | after_success: |
python3 -m pip install twine python3 -m pip install twine
@@ -77,7 +77,7 @@ jobs:
name: Build and deploy Windows wheels name: Build and deploy Windows wheels
os: windows os: windows
language: shell language: shell
install: python3 -m pip install cibuildwheel==1.6.2 install: python3 -m pip install cibuildwheel==1.6.3
script: python3 -m cibuildwheel --output-dir wheelhouse script: python3 -m cibuildwheel --output-dir wheelhouse
after_success: | after_success: |
python3 -m pip install twine python3 -m pip install twine
+1 -1
View File
@@ -11,7 +11,7 @@ long_description = (this_directory / 'README.md').read_text(encoding='utf-8')
setup( setup(
name='cibuildwheel', name='cibuildwheel',
version='1.6.2', version='1.6.3',
install_requires=['bashlex!=0.13', 'toml'], install_requires=['bashlex!=0.13', 'toml'],
description="Build Python wheels on CI with minimal configuration.", description="Build Python wheels on CI with minimal configuration.",
long_description=long_description, long_description=long_description,
+4 -5
View File
@@ -13,11 +13,10 @@ project_with_ssl_tests = test_projects.new_c_project(
else: else:
from urllib.request import urlopen from urllib.request import urlopen
if sys.version_info[0:2] == (3, 3): context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
data = urlopen("https://www.nist.gov") data = urlopen("https://www.nist.gov", context=context)
else: data = urlopen("https://raw.githubusercontent.com/joerick/cibuildwheel/master/CI.md", context=context)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) data = urlopen("https://raw.githubusercontent.com/joerick/cibuildwheel/master/CI.md")
data = urlopen("https://www.nist.gov", context=context)
''') ''')
) )