Skip to content

Commit 067b5bc

Browse files
Merge pull request #52 from osgeonepal/feat/hybrid-history
fix(build): add build for the multiprocessing
2 parents aab8492 + 8a65d02 commit 067b5bc

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

packaging/pyinstaller/entry.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
"""Frozen-app entry point: PyInstaller needs a real script to launch the Typer CLI."""
22

3+
import multiprocessing
4+
35
from osmsg.cli import app
46

57
if __name__ == "__main__":
8+
multiprocessing.freeze_support() # ProcessPoolExecutor workers would recursively relaunch the exe otherwise
69
app()

tests/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
from osmsg.db.schema import create_tables
1313

1414

15+
@pytest.fixture(autouse=True)
16+
def _isolate_cwd(tmp_path, monkeypatch):
17+
"""Run each test from its own tmp dir so a CLI or pipeline run never writes stats.* into the repo
18+
root (which would otherwise trip pre-commit's modified-files check)."""
19+
monkeypatch.chdir(tmp_path)
20+
21+
1522
def _writer(path: Path) -> osmium.SimpleWriter:
1623
return osmium.SimpleWriter(str(path), overwrite=True)
1724

0 commit comments

Comments
 (0)