diff --git a/.kokoro/presubmit.bat b/.kokoro/presubmit.bat index da80dd57..cb666d72 100644 --- a/.kokoro/presubmit.bat +++ b/.kokoro/presubmit.bat @@ -21,13 +21,9 @@ cd .. call git config --global --add safe.directory C:/tmpfs/src/github/python-crc32c call git submodule update --recursive || goto :error -@echo "Build Wheels" +@echo "Build Wheels and Run Tests" call scripts\windows\build.bat || goto :error -@echo "Run Tests" -call scripts\windows\test.bat || goto :error - - for /r %%a in (*.whl) do xcopy "%%a" %KOKORO_ARTIFACTS_DIR% /i goto :EOF diff --git a/README.md b/README.md index d67a8502..8b889fbf 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ C toolchain. # Currently Published Wheels -Wheels are currently published for Python 3.8, 3.9, 3.10, 3.11 and 3.12 +Wheels are currently published for CPython 3.8, 3.9, 3.10, 3.11 and 3.12 for multiple architectures. PyPy 3.9 and 3.10 are also supported for Linux. For information on building your own wheels please view [BUILDING.md](BUILDING.md). @@ -33,4 +33,4 @@ Wheels are published for `x86_64` and `arm64` architectures. ## Windows -Wheels are published for `win32` and `win_amd64` architectures. +Wheels are published for the `win_amd64` architecture. diff --git a/scripts/windows/build.bat b/scripts/windows/build.bat index 83669753..6595e8bf 100644 --- a/scripts/windows/build.bat +++ b/scripts/windows/build.bat @@ -22,7 +22,7 @@ set CRC32C_INSTALL_PREFIX=%cd%\build\%CONFIGURATION% @rem Iterate through supported Python versions. @rem Unfortunately pyenv for Windows has an out-of-date versions list. Choco's @rem installer seems to have some problems with installing multiple versions at -@rem once, but it can be coaxed to try anyways with --force. +@rem once, so as a workaround, we will install and then uninstall every version. FOR %%P IN (3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.4) DO ( echo "Installing Python version %%P" @@ -65,6 +65,12 @@ FOR %%P IN (3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.4) DO ( py -%%P setup.py build_ext -v --include-dirs=%CRC32C_INSTALL_PREFIX%\include --library-dirs=%CRC32C_INSTALL_PREFIX%\lib echo "Building Wheel" py -%%P -m pip wheel . --wheel-dir wheels/ + + echo "Built wheel, now running tests." + call %~dp0/test.bat + + echo "Finished with Python version %%P, now uninstalling" + choco uninstall python -y ) echo "Windows build has completed successfully" diff --git a/scripts/windows/test.bat b/scripts/windows/test.bat index 9ed80ec9..4137daae 100644 --- a/scripts/windows/test.bat +++ b/scripts/windows/test.bat @@ -15,11 +15,15 @@ @rem This test file runs for one Python version at a time, and is intended to @rem be called from within the build loop. -FOR %%P IN (3.8.10, 3.9.13, 3.10.11, 3.11.9, 3.12.4) DO ( - py -%%P -m pip install --no-index --find-links=wheels google-crc32c --force-reinstall +set PYTHON_VERSION=%1 +if "%PYTHON_VERSION%"=="" ( + echo "Python version was not provided, using Python 3.10" + set PYTHON_VERSION=3.10 +) - py -%%P ./scripts/check_crc32c_extension.py +py -%PYTHON_VERSION% -m pip install --no-index --find-links=wheels google-crc32c --force-reinstall - py -%%P -m pip install pytest - py -%%P -m pytest tests -) \ No newline at end of file +py -%PYTHON_VERSION% ./scripts/check_crc32c_extension.py + +py -%PYTHON_VERSION% -m pip install pytest +py -%PYTHON_VERSION% -m pytest tests