diff --git a/.github/actions/build-python-from-source/action.yml b/.github/actions/build-python-from-source/action.yml index 692130d..2c6580c 100644 --- a/.github/actions/build-python-from-source/action.yml +++ b/.github/actions/build-python-from-source/action.yml @@ -65,11 +65,13 @@ runs: fi # Build it! if [ "${{ runner.os }}" != "Windows" ]; then - ./configure --prefix=$prefix $configure_options --enable-optimizations + ./configure --prefix=$prefix CFLAGS="-O3" CXXFLAGS="-O3" $configure_options make -j $(nproc) # Use all available processors to speed up the build. else # Use the build script provided for Windows in the Python source. - ./PCbuild/build.bat -e -d + set CFLAGS=/Ox + set CXXFLAGS=/Ox + ./PCbuild/build.bat -e -d $configure_options fi # Install the built Python version. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ee1a5f..8423efb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,9 +27,9 @@ jobs: #- os: ubuntu-latest # python-version: '3.12.7' # build-from-source: false - #- os: ubuntu-latest - # python-version: '3.13.0-rc.3' - # build-from-source: false + - os: ubuntu-latest + python-version: '3.13.0-rc.3' + build-from-source: false #- os: windows-latest # python-version: '3.13.0-rc.3' # build-from-source: false diff --git a/setup.py b/setup.py index d612176..af243f9 100644 --- a/setup.py +++ b/setup.py @@ -26,24 +26,12 @@ def check_venv() -> None: ) -def patch_out() -> None: - """ - Patch out certain modules to prevent import conflicts on Windows. - """ - # On windows mock gets imported from _msvccompiler which then tries to import asyncio - # which causes a name conflict on concurrent. This prevents that. - if sys.platform.startswith("win"): - sys.modules["unittest"] = type(sys)("unittest") - sys.modules["unittest.mock"] = type(sys)("mock") - - def check_compiler() -> None: """ Check the default compiler for the current platform and fix up name clashed on windows. Prints the found compiler class. """ - patch_out() import distutils.ccompiler as cc plat = os.name