Skip to content

Commit 1fa5b8e

Browse files
shunirrclaude
andcommitted
Migrate from Poetry and mise to uv for Python management
- Convert pyproject.toml from Poetry to standard PEP 621 format - Update GitHub Actions workflow to use uv instead of Poetry - Remove Poetry lock file and mise configuration - Add development setup instructions using uv to README - Update .gitignore to exclude uv-specific files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 291e87e commit 1fa5b8e

File tree

6 files changed

+69
-414
lines changed

6 files changed

+69
-414
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
uses: actions/setup-python@v5
4141
with:
4242
python-version: "3.11"
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v4
4345
- name: Install dependencies
4446
run: |
45-
python -m pip install --upgrade pip
46-
pip install poetry
47-
poetry install
47+
uv sync --extra dev
4848
- name: Build executable
4949
run: |
50-
poetry run pyinstaller --onefile --clean --name "fontsplitta" "fontsplitta/__main__.py"
50+
uv run pyinstaller --onefile --clean --name "fontsplitta" "fontsplitta/__main__.py"
5151
- name: Archive Release (Windows)
5252
if: matrix.os == 'windows-latest'
5353
run: |
@@ -64,26 +64,22 @@ jobs:
6464
files: "dist/${{ steps.set-filename.outputs.result }}"
6565
release-python:
6666
runs-on: ubuntu-latest
67-
env:
68-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI}}
6967
steps:
7068
- name: Checkout
7169
uses: actions/checkout@v4
72-
- name: Setup vars
73-
id: setup-vars
74-
run: grep "python" "mise.toml" | perl -pe 's/[ "]+//g' >> $GITHUB_OUTPUT
7570
- name: Setup Python
7671
uses: actions/setup-python@v5
7772
with:
78-
python-version: ${{ steps.setup-vars.outputs.python }}
73+
python-version: "3.11"
74+
- name: Install uv
75+
uses: astral-sh/setup-uv@v4
7976
- name: Install dependencies
8077
run: |
81-
python -m pip install --upgrade pip
82-
pip install poetry
83-
poetry install
78+
uv sync
8479
- name: Publish package
8580
run: |
86-
poetry publish --build
81+
uv build
82+
uv publish --token ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
8783
update-homebrew:
8884
runs-on: ubuntu-latest
8985
needs: release-binary

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ pyrightconfig.json
175175

176176
# End of https://www.toptal.com/developers/gitignore/api/python
177177

178+
# uv
179+
.venv/
180+
uv.lock
181+
178182
*.ttf
179183
*.otf
180184
*.eot

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,43 @@ Or, you can download executables from releases:
2626

2727
- https://github.com/shunirr/fontsplitta/releases
2828

29+
## Development
30+
31+
This project uses [uv](https://github.com/astral-sh/uv) for Python project management.
32+
33+
To set up the development environment:
34+
35+
```console
36+
# Install uv (if not already installed)
37+
curl -LsSf https://astral.sh/uv/install.sh | sh
38+
39+
# Clone the repository
40+
git clone https://github.com/shunirr/fontsplitta.git
41+
cd fontsplitta
42+
43+
# Create virtual environment and install dependencies
44+
uv sync
45+
46+
# Install with dev dependencies
47+
uv sync --extra dev
48+
49+
# Activate the virtual environment
50+
source .venv/bin/activate
51+
52+
# Run fontsplitta in development mode
53+
fontsplitta --help
54+
```
55+
56+
To build the project:
57+
58+
```console
59+
# Build distributions
60+
uv build
61+
62+
# Build standalone executable with PyInstaller
63+
uv run pyinstaller --onefile fontsplitta/__main__.py -n fontsplitta
64+
```
65+
2966
## Getting Started
3067

3168
Firstly, generate an `unicode_ranges.txt` using Google Fonts' CSS:

mise.toml

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

0 commit comments

Comments
 (0)