From a0f9662e537fdcc074a7801b11495747f8c22601 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 11 Mar 2022 23:58:47 +0000 Subject: [PATCH 1/4] Attempt to re-enable Windows tests According to a comment in pypa/distutils#118 this problem might be solved by allowing tox to pass some environment variables. --- .github/workflows/main.yml | 3 +-- tox.ini | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2979efd19..c680fb3636 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,8 +24,7 @@ jobs: platform: - ubuntu-latest - macos-latest - # disable tests on Windows due to pypa/distutils#118 - # - windows-latest + - windows-latest include: - platform: ubuntu-latest python: "3.10" diff --git a/tox.ini b/tox.ini index a56ea24b6d..5fb7cb5b11 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,8 @@ passenv = windir # required for test_pkg_resources # honor git config in pytest-perf HOME + PROGRAMFILES + PROGRAMFILES(x86) [testenv:integration] deps = {[testenv]deps} @@ -27,6 +29,8 @@ extras = testing-integration passenv = {[testenv]passenv} DOWNLOAD_PATH + PROGRAMFILES + PROGRAMFILES(x86) setenv = PROJECT_ROOT = {toxinidir} commands = From 8f3cdf705cbf5ba29238c9e5e900727d488bf463 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sun, 13 Mar 2022 10:11:27 +0000 Subject: [PATCH 2/4] Use windows-2019 for tests in GitHub Actions For the time being let's just use the older version for the GHA host, so we can keep testing on Windows, instead of skipping it at all. --- .github/workflows/main.yml | 2 +- tox.ini | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c680fb3636..5be824c1cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: platform: - ubuntu-latest - macos-latest - - windows-latest + - windows-2019 include: - platform: ubuntu-latest python: "3.10" diff --git a/tox.ini b/tox.ini index 5fb7cb5b11..a56ea24b6d 100644 --- a/tox.ini +++ b/tox.ini @@ -20,8 +20,6 @@ passenv = windir # required for test_pkg_resources # honor git config in pytest-perf HOME - PROGRAMFILES - PROGRAMFILES(x86) [testenv:integration] deps = {[testenv]deps} @@ -29,8 +27,6 @@ extras = testing-integration passenv = {[testenv]passenv} DOWNLOAD_PATH - PROGRAMFILES - PROGRAMFILES(x86) setenv = PROJECT_ROOT = {toxinidir} commands = From fb258ed194228a95a3043c19abe215bd8c23ddab Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 14 Mar 2022 01:12:06 +0000 Subject: [PATCH 3/4] Exclude PyPy+Windows from test matrix --- .github/workflows/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5be824c1cb..bc5b1e4d7c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,11 @@ jobs: - platform: ubuntu-latest python: "3.10" distutils: stdlib + exclude: + # The combination of PyPy+Windows+pytest-xdist+ProcessPoolExecutor is flaky/problematic + - platform: windows-2019 + python: pypy-3.7 + distutils: local runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} From 8afae7f683766e7e716a226a43ccc95d69675851 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Mon, 14 Mar 2022 01:18:43 +0000 Subject: [PATCH 4/4] Just skip the most problematic test for PyPy on Windows --- .github/workflows/main.yml | 5 ----- setuptools/tests/test_build_meta.py | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc5b1e4d7c..5be824c1cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,11 +29,6 @@ jobs: - platform: ubuntu-latest python: "3.10" distutils: stdlib - exclude: - # The combination of PyPy+Windows+pytest-xdist+ProcessPoolExecutor is flaky/problematic - - platform: windows-2019 - python: pypy-3.7 - distutils: local runs-on: ${{ matrix.platform }} env: SETUPTOOLS_USE_DISTUTILS: ${{ matrix.distutils }} diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index eb43fe9b0e..c4cdda0306 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -18,6 +18,13 @@ IS_PYPY = '__pypy__' in sys.builtin_module_names +pytestmark = pytest.mark.skipif( + sys.platform == "win32" and IS_PYPY, + reason="The combination of PyPy + Windows + pytest-xdist + ProcessPoolExecutor " + "is flaky and problematic" +) + + class BuildBackendBase: def __init__(self, cwd='.', env={}, backend_name='setuptools.build_meta'): self.cwd = cwd