Merge pull request #24399 from lidizheng/patch-support-3.9-1-33

[Backport] Python 3.9 binary wheels for Linux and macOS
pull/24405/head
Lidi Zheng 4 years ago committed by GitHub
commit ca39dd6938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      setup.py
  2. 1
      src/python/grpcio_channelz/setup.py
  3. 1
      src/python/grpcio_health_checking/setup.py
  4. 1
      src/python/grpcio_reflection/setup.py
  5. 1
      src/python/grpcio_status/setup.py
  6. 20
      tools/internal_ci/helper_scripts/install_python_interpreters.ps1
  7. 5
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  8. 4
      tools/internal_ci/helper_scripts/prepare_build_windows.bat
  9. 1
      tools/internal_ci/macos/grpc_build_artifacts.sh
  10. 7
      tools/run_tests/artifacts/artifact_targets.py
  11. 1
      tools/run_tests/artifacts/build_artifact_python.sh

@ -102,6 +102,7 @@ CLASSIFIERS = [
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]

@ -55,6 +55,7 @@ CLASSIFIERS = [
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]

@ -54,6 +54,7 @@ CLASSIFIERS = [
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]

@ -55,6 +55,7 @@ CLASSIFIERS = [
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]

@ -54,6 +54,7 @@ CLASSIFIERS = [
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'License :: OSI Approved :: Apache Software License',
]

@ -35,7 +35,7 @@ function Install-Python {
Write-Host "Python installer $PythonInstallerPath validated."
# Installs Python
& $PythonInstallerPath /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 TargetDir=$PythonInstallPath
& $PythonInstallerPath /passive InstallAllUsers=1 PrependPath=1 Include_test=0 TargetDir=$PythonInstallPath
if (-Not $?) {
throw "The Python installation exited with error!"
}
@ -61,6 +61,7 @@ function Install-Python {
Write-Host "Python $PythonVersion installed by $PythonInstaller at $PythonInstallPath."
}
# Python 3.8
$Python38x86Config = @{
PythonVersion = "3.8.0"
PythonInstaller = "python-3.8.0"
@ -76,3 +77,20 @@ $Python38x64Config = @{
PythonInstallerHash = "29ea87f24c32f5e924b7d63f8a08ee8d"
}
Install-Python @Python38x64Config
# Python 3.9
$Python39x86Config = @{
PythonVersion = "3.9.0"
PythonInstaller = "python-3.9.0"
PythonInstallPath = "C:\Python39_32bit"
PythonInstallerHash = "4a2812db8ab9f2e522c96c7728cfcccb"
}
# Install-Python @Python39x86Config
$Python39x64Config = @{
PythonVersion = "3.9.0"
PythonInstaller = "python-3.9.0-amd64"
PythonInstallPath = "C:\Python39"
PythonInstallerHash = "b61a33dc28f13b561452f3089c87eb63"
}
# Install-Python @Python39x64Config

@ -94,14 +94,17 @@ then
brew update-reset
brew upgrade coreutils
# Install Python 3.7 and Python 3.8
# Install Python 3.7, 3.8, 3.9
time curl -O https://www.python.org/ftp/python/3.7.0/python-3.7.0-macosx10.9.pkg
time curl -O https://www.python.org/ftp/python/3.8.0/python-3.8.0-macosx10.9.pkg
time curl -O https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg
echo "ae0717a02efea3b0eb34aadc680dc498 python-3.7.0-macosx10.9.pkg" > /tmp/python_installer_checksum.md5
echo "f5f9ae9f416170c6355cab7256bb75b5 python-3.8.0-macosx10.9.pkg" >> /tmp/python_installer_checksum.md5
echo "16ca86fa3467e75bade26b8a9703c27f python-3.9.0-macosx10.9.pkg" >> /tmp/python_installer_checksum.md5
md5sum -c /tmp/python_installer_checksum.md5
time sudo installer -pkg ./python-3.7.0-macosx10.9.pkg -target /
time sudo installer -pkg ./python-3.8.0-macosx10.9.pkg -target /
time sudo installer -pkg ./python-3.9.0-macosx10.9.pkg -target /
fi
if [ "${PREPARE_BUILD_INSTALL_DEPS_CSHARP}" == "true" ]

@ -36,10 +36,10 @@ python -m pip install google-api-python-client || goto :error
powershell -File src\csharp\install_dotnet_sdk.ps1 || goto :error
set PATH=%LOCALAPPDATA%\Microsoft\dotnet;%PATH%
@rem Install Python 3.8.0
@rem Install Python interpreters
@rem NOTE(lidiz): Python installer process may live longer than expected, and
@rem has other side effects. It needs to be installed last to reduce impact.
powershell -File tools\internal_ci\helper_scripts\install_python38.ps1 || goto :error
powershell -File tools\internal_ci\helper_scripts\install_python_interpreters.ps1 || goto :error
@rem Disable some unwanted dotnet options
set NUGET_XMLDOC_MODE=skip

@ -29,6 +29,7 @@ python3.5 -m pip install -U cython setuptools==44.1.1 wheel --user
python3.6 -m pip install -U cython setuptools==44.1.1 wheel --user
python3.7 -m pip install -U cython setuptools==44.1.1 wheel --user
python3.8 -m pip install -U cython setuptools==44.1.1 wheel --user
python3.9 -m pip install -U cython setuptools==44.1.1 wheel --user
# needed to build ruby artifacts
time bash tools/distrib/build_ruby_environment_macos.sh

@ -360,6 +360,7 @@ def targets():
PythonArtifact('manylinux2014', 'x86', 'cp36-cp36m'),
PythonArtifact('manylinux2014', 'x86', 'cp37-cp37m'),
PythonArtifact('manylinux2014', 'x86', 'cp38-cp38'),
PythonArtifact('manylinux2014', 'x86', 'cp39-cp39'),
PythonArtifact('manylinux2010', 'x64', 'cp27-cp27m'),
PythonArtifact('manylinux2010', 'x64', 'cp27-cp27mu'),
PythonArtifact('manylinux2010', 'x64', 'cp35-cp35m'),
@ -372,6 +373,7 @@ def targets():
PythonArtifact('manylinux2010', 'x86', 'cp36-cp36m'),
PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m'),
PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'),
PythonArtifact('manylinux2010', 'x86', 'cp39-cp39'),
PythonArtifact('linux_extra', 'armv7', '2.7'),
PythonArtifact('linux_extra', 'armv7', '3.5'),
PythonArtifact('linux_extra', 'armv7', '3.6'),
@ -383,16 +385,21 @@ def targets():
PythonArtifact('macos', 'x64', 'python3.6'),
PythonArtifact('macos', 'x64', 'python3.7'),
PythonArtifact('macos', 'x64', 'python3.8'),
PythonArtifact('macos', 'x64', 'python3.9'),
PythonArtifact('windows', 'x86', 'Python27_32bit'),
PythonArtifact('windows', 'x86', 'Python35_32bit'),
PythonArtifact('windows', 'x86', 'Python36_32bit'),
PythonArtifact('windows', 'x86', 'Python37_32bit'),
PythonArtifact('windows', 'x86', 'Python38_32bit'),
# TODO(lidiz) uncomment if Python39 installs stably.
# PythonArtifact('windows', 'x86', 'Python39_32bit'),
PythonArtifact('windows', 'x64', 'Python27'),
PythonArtifact('windows', 'x64', 'Python35'),
PythonArtifact('windows', 'x64', 'Python36'),
PythonArtifact('windows', 'x64', 'Python37'),
PythonArtifact('windows', 'x64', 'Python38'),
# TODO(lidiz) uncomment if Python39 installs stably.
# PythonArtifact('windows', 'x64', 'Python39'),
RubyArtifact('linux', 'x64'),
RubyArtifact('macos', 'x64'),
PHPArtifact('linux', 'x64')

@ -137,6 +137,7 @@ then
fi
# Ensure the generated artifacts are valid.
"${PYTHON}" -m pip install virtualenv
"${PYTHON}" -m virtualenv venv || { "${PYTHON}" -m pip install virtualenv==16.7.9 && "${PYTHON}" -m virtualenv venv; }
venv/bin/python -m pip install "twine<=2.0"
venv/bin/python -m twine check dist/* tools/distrib/python/grpcio_tools/dist/*

Loading…
Cancel
Save