Repository: ronf/asyncssh (language: python)

Issue:
Workflow problem suddenly appears on macOS
@hexchain Sorry to bother you again, but I suddenly started to see workflow errors on macOS tonight which seem unrelated to the change I made. I suspect something referenced in the workflow was perhaps updated. See https://github.com/ronf/asyncssh/actions/runs/5676027821 for an example of the failures. They seem related to running "setup.py clean", getting an error of "Directory not empty". For example:

```
      OSError: [Errno 66] Directory not empty: '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-clmiyga6/python-pkcs11_3c253ba59f2343ada4601d24857ff6bd/.eggs/Cython-3.0.0-py3.7-macosx-11.7-x86_64.egg/Cython-3.0.0.dist-info' -> '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-clmiyga6/python-pkcs11_3c253ba59f2343ada4601d24857ff6bd/.eggs/Cython-3.0.0-py3.7-macosx-11.7-x86_64.egg/EGG-INFO'
```

This seems to be occurring on macOS on all Python versions (3.7 to 3.11), but not at all on Linux or Windows. It may be specific to python-pkcs11, but I'm not sure.

Any suggestions on how to get to the bottom of this?


Discussion / hints:
No worries, I'll take a look.

Fix patch:
diff --git a/tox.ini b/tox.ini
index ad820cc..cd32e3a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -26,6 +26,7 @@ platform =
     windows: win32
 usedevelop = True
 setenv =
+    PIP_USE_PEP517 = 1
     COVERAGE_FILE = .coverage.{envname}
 commands =
     {envpython} -m pytest --cov --cov-report=term-missing:skip-covered {posargs}


Test patch:
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index b3e568c..b863c30 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -111,7 +111,7 @@ jobs:
           V = sys.version_info
           p = platform.system().lower()
           subprocess.run(
-              ['tox', '-e', f'py{V.major}{V.minor}-{p}', '--', '-ra'],
+              ['tox', 'run', '-e', f'py{V.major}{V.minor}-{p}', '--', '-ra'],
               check=True)
 
       - name: Upload coverage data