Skip to content

Commit 6e7a2f5

Browse files
committed
python: switch from cp.sh to cp.py for windows support
1 parent 9d1ec86 commit 6e7a2f5

5 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Install dependencies
5151
run: uv sync --group dev
5252
- name: copy data files
53-
run: ./cp.sh
53+
run: python cp.py
5454
- name: pytest
5555
run: uv run poe test
5656

.github/workflows/release-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
git push
3838
git push origin "v${{ inputs.release }}"
3939
- name: copy data files
40-
run: ./cp.sh
40+
run: python cp.py
4141
- name: Build sdist and wheel
4242
run: uv build
4343
- name: Push build artifacts to PyPI

python/cp.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python3
2+
import shutil
3+
from pathlib import Path
4+
5+
HERE = Path(__file__).parent.absolute()
6+
NAMES_CSV = HERE.parent / "names.csv"
7+
DEST = HERE / "src" / "nicknames" / "names.csv"
8+
print("Copying names.csv from", NAMES_CSV, "to", DEST)
9+
shutil.copyfile(NAMES_CSV, DEST)

python/cp.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

python/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ check-ruff = "ruff check .."
4747
check-ty = "ty check .."
4848
fix-fmt = "ruff format .."
4949
fix-ruff = "ruff check --fix .."
50-
build.shell = "./cp.sh && uv build"
5150
test = "uv run pytest"
5251
check = ["check-fmt", "check-ruff", "check-ty"]
5352
fix = ["fix-fmt", "fix-ruff"]

0 commit comments

Comments
 (0)