|
85 | 85 | pip install -e . |
86 | 86 | pip install -r requirements-dev.txt |
87 | 87 |
|
| 88 | + - name: Use pysqlite3 on Linux (enable SQLite extensions in Python) |
| 89 | + if: runner.os == 'Linux' |
| 90 | + run: | |
| 91 | + pip install pysqlite3-binary |
| 92 | + python - <<'PY' |
| 93 | + import textwrap, pathlib |
| 94 | + pathlib.Path('sitecustomize.py').write_text(textwrap.dedent(''' |
| 95 | + import pysqlite3 as sqlite3 |
| 96 | + import sys |
| 97 | + sys.modules['sqlite3'] = sqlite3 |
| 98 | + sys.modules['sqlite3.dbapi2'] = sqlite3 |
| 99 | + ''').lstrip()) |
| 100 | + print('Wrote sitecustomize.py override for Linux') |
| 101 | + PY |
| 102 | + echo "PYTHONPATH=$PWD:$PYTHONPATH" >> $GITHUB_ENV |
| 103 | +
|
| 104 | + - name: Use pysqlite3 on macOS (enable SQLite extensions in Python) |
| 105 | + if: runner.os == 'macOS' |
| 106 | + run: | |
| 107 | + pip install pysqlite3-binary |
| 108 | + python - <<'PY' |
| 109 | + import textwrap, pathlib |
| 110 | + pathlib.Path('sitecustomize.py').write_text(textwrap.dedent(''' |
| 111 | + import pysqlite3 as sqlite3 |
| 112 | + import sys |
| 113 | + sys.modules['sqlite3'] = sqlite3 |
| 114 | + sys.modules['sqlite3.dbapi2'] = sqlite3 |
| 115 | + ''').lstrip()) |
| 116 | + print('Wrote sitecustomize.py override for macOS') |
| 117 | + PY |
| 118 | + echo "PYTHONPATH=$PWD:$PYTHONPATH" >> $GITHUB_ENV |
| 119 | +
|
| 120 | + - name: Use pysqlite3 on Windows (enable SQLite extensions in Python) |
| 121 | + if: runner.os == 'Windows' |
| 122 | + shell: powershell |
| 123 | + run: | |
| 124 | + pip install pysqlite3-binary |
| 125 | + python - <<'PY' |
| 126 | + import textwrap, pathlib |
| 127 | + pathlib.Path('sitecustomize.py').write_text(textwrap.dedent(''' |
| 128 | + import pysqlite3 as sqlite3 |
| 129 | + import sys |
| 130 | + sys.modules['sqlite3'] = sqlite3 |
| 131 | + sys.modules['sqlite3.dbapi2'] = sqlite3 |
| 132 | + ''').lstrip()) |
| 133 | + print('Wrote sitecustomize.py override for Windows') |
| 134 | + PY |
| 135 | + "$env:PYTHONPATH=$pwd;${env:PYTHONPATH}" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 |
| 136 | +
|
88 | 137 | - name: Lint with ruff |
89 | 138 | run: ruff check . |
90 | 139 |
|
|
0 commit comments