Skip to content

Commit

Permalink
remove debug cruft, enable windows tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Oct 29, 2024
1 parent 56e960a commit f40b90e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,12 @@ jobs:
CIBW_PRERELEASE_PYTHONS: 'True'
CIBW_FREE_THREADED_SUPPORT: 'True'
CIBW_TEST_REQUIRES: pytest setuptools # 3.12+ no longer includes distutils, just always ensure setuptools is present
CIBW_TEST_COMMAND: PYTHONUNBUFFERED=1 python -m pytest -s ${{ matrix.test_args || '{project}' }} # default to test all
CIBW_TEST_COMMAND: PYTHONUNBUFFERED=1 python -m pytest ${{ matrix.test_args || '{project}' }} # default to test all
run: |
set -eux
mkdir cffi
tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
Expand Down Expand Up @@ -511,7 +511,7 @@ jobs:
CIBW_TEST_REQUIRES: pytest setuptools
CIBW_TEST_COMMAND: 'python -m pytest {package}/src/c'
# FIXME: /testing takes ~45min on Windows and has some failures...
# CIBW_TEST_COMMAND='python -m pytest {package}/src/c {project}/testing'
CIBW_TEST_COMMAND='python -m pytest {package}/src/c {project}/testing'
run: |
set -eux
Expand Down
8 changes: 3 additions & 5 deletions src/cffi/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ def cleanup_tmpdir(tmpdir=None, keep_so=False):
suffix = _get_so_suffixes()[0].lower()
for fn in filelist:
if fn.lower().startswith('_cffi_') and (
fn.lower().endswith(suffix) or
fn.lower().endswith('.c') or
fn.lower().endswith(suffix) or
fn.lower().endswith('.c') or
fn.lower().endswith('.o')):
try:
os.unlink(os.path.join(tmpdir, fn))
except OSError as e:
except OSError:
pass
clean_dir = [os.path.join(tmpdir, 'build')]
for dir in clean_dir:
Expand All @@ -302,8 +302,6 @@ def cleanup_tmpdir(tmpdir=None, keep_so=False):
os.unlink(fn)
except OSError:
pass
print("after cleanup_tmp in",tmpdir)
print("files left:\n", "\n".join(os.listdir(tmpdir)))

def _get_so_suffixes():
suffixes = _extension_suffixes()
Expand Down

0 comments on commit f40b90e

Please sign in to comment.