diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a873aa2d29d..dc7b4bc502d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -107,6 +107,8 @@ env: test_yield_from # Python version targeted by the CI. PYTHON_VERSION: "3.13.1" + X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD + X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include jobs: rust_tests: @@ -118,7 +120,7 @@ jobs: timeout-minutes: 45 strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest, windows-2025] fail-fast: false steps: - uses: actions/checkout@v6.0.1 @@ -127,14 +129,6 @@ jobs: components: clippy - uses: Swatinem/rust-cache@v2 - # Only for OpenSSL builds - # - name: Set up the Windows environment - # shell: bash - # run: | - # git config --system core.longpaths true - # cargo install --target-dir=target -v cargo-vcpkg - # cargo vcpkg -v build - # if: runner.os == 'Windows' - name: Set up the Mac environment run: brew install autoconf automake libtool if: runner.os == 'macOS' @@ -257,7 +251,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest, windows-2025] fail-fast: false steps: - uses: actions/checkout@v6.0.1 @@ -266,14 +260,6 @@ jobs: - uses: actions/setup-python@v6.1.0 with: python-version: ${{ env.PYTHON_VERSION }} - # Only for OpenSSL builds - # - name: Set up the Windows environment - # shell: bash - # run: | - # git config --system core.longpaths true - # cargo install cargo-vcpkg - # cargo vcpkg build - # if: runner.os == 'Windows' - name: Set up the Mac environment run: brew install autoconf automake libtool openssl@3 if: runner.os == 'macOS' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5ad2cf3f97a..c11d11d9805 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,8 @@ permissions: env: CARGO_ARGS: --no-default-features --features stdlib,importlib,encodings,sqlite,ssl + X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD + X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include jobs: build: @@ -42,11 +44,11 @@ jobs: target: aarch64-apple-darwin # - runner: macos-latest # target: x86_64-apple-darwin - - runner: windows-latest + - runner: windows-2025 target: x86_64-pc-windows-msvc -# - runner: windows-latest +# - runner: windows-2025 # target: i686-pc-windows-msvc -# - runner: windows-latest +# - runner: windows-2025 # target: aarch64-pc-windows-msvc fail-fast: false steps: @@ -57,13 +59,6 @@ jobs: - name: Set up Environment shell: bash run: rustup target add ${{ matrix.platform.target }} - - name: Set up Windows Environment - shell: bash - run: | - git config --global core.longpaths true - cargo install --target-dir=target -v cargo-vcpkg - cargo vcpkg -v build - if: runner.os == 'Windows' - name: Set up MacOS Environment run: brew install autoconf automake libtool if: runner.os == 'macOS' diff --git a/Cargo.toml b/Cargo.toml index 988e99efacc..ccfac44d601 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,16 +91,6 @@ lto = "thin" # REDOX START, Uncomment when you want to compile/check with redoxer # REDOX END -# Used only on Windows to build the vcpkg dependencies -[package.metadata.vcpkg] -git = "https://github.com/microsoft/vcpkg" -# The revision of the vcpkg repository to use -# https://github.com/microsoft/vcpkg/tags -rev = "2025.09.17" - -[package.metadata.vcpkg.target] -x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md", dev-dependencies = ["openssl" ] } - [package.metadata.packager] product-name = "RustPython" identifier = "com.rustpython.rustpython" diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 73ad81e871b..0e973255621 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -194,7 +194,6 @@ def test_rmtree_works_on_bytes(self): self.assertIsInstance(victim, bytes) shutil.rmtree(victim) - @unittest.skipIf(sys.platform == 'win32', 'TODO: RUSTPYTHON; flaky') @os_helper.skip_unless_symlink def test_rmtree_fails_on_symlink_onerror(self): tmp = self.mkdtemp() diff --git a/crates/common/src/fileutils.rs b/crates/common/src/fileutils.rs index 9ed5e77afbb..7170b270d95 100644 --- a/crates/common/src/fileutils.rs +++ b/crates/common/src/fileutils.rs @@ -303,7 +303,8 @@ pub mod windows { let GetFileInformationByName = GET_FILE_INFORMATION_BY_NAME .get_or_init(|| { - let library_name = OsString::from("api-ms-win-core-file-l2-1-4").to_wide_with_nul(); + let library_name = + OsString::from("api-ms-win-core-file-l2-1-4.dll").to_wide_with_nul(); let module = unsafe { LoadLibraryW(library_name.as_ptr()) }; if module.is_null() { return None;