Skip to content

Commit 1cd7b76

Browse files
JPHutchinsclaude
andcommitted
build: migrate from poetry to uv
Replace the poetry project definition with a PEP 621 [project] table plus PEP 735 [dependency-groups]; maturin stays the build backend. Commit uv.lock for a reproducible dev environment. - raise requires-python to >=3.10 (drop EOL 3.7-3.9) - pin dev deps to current majors (pytest 9, pytest-benchmark 5, hypothesis 6, maturin 1.9) plus the build-system maturin requirement - prune the noisy stock-Python .gitignore down to what this project actually produces (Python, Rust, envs, tool caches) - repoint shell.nix, the Makefile, and the developer README at uv Co-Authored-By: claude-opus-4-8[1m] <noreply@anthropic.com>
1 parent 541013d commit 1cd7b76

6 files changed

Lines changed: 324 additions & 137 deletions

File tree

.gitignore

Lines changed: 13 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,29 @@
1-
Byte-compiled / optimized / DLL files
1+
# Python
22
__pycache__/
33
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
74
*.so
85

9-
# Distribution / packaging
10-
.Python
6+
# Build / packaging
117
build/
12-
develop-eggs/
138
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
229
wheels/
2310
*.egg-info/
24-
.installed.cfg
25-
*.egg
26-
MANIFEST
27-
28-
# PyInstaller
29-
# Usually these files are written by a python script from a template
30-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31-
*.manifest
32-
*.spec
33-
34-
# Installer logs
35-
pip-log.txt
36-
pip-delete-this-directory.txt
37-
38-
# Unit test / coverage reports
39-
htmlcov/
40-
.tox/
41-
.coverage
42-
.coverage.*
43-
.cache
44-
nosetests.xml
45-
coverage.xml
46-
*.cover
47-
.hypothesis/
48-
.pytest_cache/
49-
50-
# Translations
51-
*.mo
52-
*.pot
53-
54-
# Django stuff:
55-
*.log
56-
local_settings.py
57-
db.sqlite3
58-
59-
# Flask stuff:
60-
instance/
61-
.webassets-cache
62-
63-
# Scrapy stuff:
64-
.scrapy
65-
66-
# Sphinx documentation
67-
docs/_build/
68-
69-
# PyBuilder
70-
target/
71-
72-
# Jupyter Notebook
73-
.ipynb_checkpoints
74-
75-
# pyenv
76-
.python-version
7711

78-
# celery beat schedule file
79-
celerybeat-schedule
80-
81-
# SageMath parsed files
82-
*.sage.py
12+
# Rust
13+
/target/
14+
**/*.rs.bk
15+
Cargo.toml.orig
8316

8417
# Environments
18+
.venv/
8519
.env
86-
.venv
87-
env/
88-
venv/
89-
ENV/
90-
env.bak/
91-
venv.bak/
92-
93-
# Spyder project settings
94-
.spyderproject
95-
.spyproject
96-
97-
# Rope project settings
98-
.ropeproject
99-
100-
# mkdocs documentation
101-
/site
10220

103-
# mypy
21+
# Tool caches
22+
.pytest_cache/
10423
.mypy_cache/
24+
.ruff_cache/
25+
.hypothesis/
26+
.benchmarks/
10527

106-
# Generated by Cargo
107-
# will have compiled files and executables
108-
/target/
109-
110-
# These are backup files generated by rustfmt
111-
**/*.rs.bk
112-
skipped.py
113-
benchmark.json
114-
.idea
115-
flame.svg
116-
perf.data
117-
perf.data.old
118-
poetry.lock
119-
Cargo.toml.orig
28+
# direnv
12029
.direnv/

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ publish: ## Publish the binding
77

88
.PHONY: build
99
build: dev-packages ## Builds Rust code and dhall-python Python modules
10-
poetry run maturin build --rustc-extra-args="-Wall"
10+
uv run maturin build --rustc-extra-args="-Wall"
1111

1212
.PHONY: build-release
1313
build-release: dev-packages ## Build dhall-python module in release mode
14-
poetry run maturin build --release
14+
uv run maturin build --release
1515

1616
.PHONY: install
1717
install: dev-packages ## Install dhall-python module into current virtualenv
18-
poetry run maturin develop --release
18+
uv run maturin develop --release
1919

2020
.PHONY: publish
2121
publish: ## Publish crate on Pypi
22-
poetry run maturin publish
22+
uv run maturin publish
2323

2424
.PHONY: clean
2525
clean: ## Clean up build artifacts
2626
cargo clean
2727

2828
.PHONY: dev-packages
2929
dev-packages: ## Install Python development packages for project
30-
poetry install
30+
uv sync
3131

3232
.PHONY: test
3333
test: dev-packages install quicktest ## Intall dhall-python module and run tests
3434

3535
.PHONY: quicktest
3636
quicktest: ## Run tests on already installed dhall-python module
37-
poetry run pytest tests
37+
uv run pytest tests

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,7 @@ issues and PRs are always welcome.
8383

8484
# Developer guide
8585

86-
This project uses [poetry](https://python-poetry.org/docs/) for managing the development environment. If you don't have it installed, run
87-
88-
```
89-
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
90-
export PATH="$HOME/.poetry/bin:$PATH"
91-
```
86+
This project uses [uv](https://docs.astral.sh/uv/) for managing the development environment. If you don't have it installed, follow the [installation guide](https://docs.astral.sh/uv/getting-started/installation/).
9287

9388
The project requires the latest `stable` version of Rust.
9489

pyproject.toml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,41 @@
1-
[tool.poetry]
1+
[project]
22
name = "dhall"
33
version = "0.1.17"
44
description = "Python bindings for dhall, a functional configuration language"
5-
authors = ["Simon Zeng <contact@simonzeng.com>", "Tristan Cacqueray <tdecacqu@redhat.com>", "Matthias Endler <matthias-endler@gmx.net>"]
5+
authors = [
6+
{ name = "Simon Zeng", email = "contact@simonzeng.com" },
7+
{ name = "Tristan Cacqueray", email = "tdecacqu@redhat.com" },
8+
{ name = "Matthias Endler", email = "matthias-endler@gmx.net" },
9+
]
610
license = "Apache-2.0"
711
readme = "README.md"
8-
packages = [{ include = "dhall" }]
9-
repository = "https://github.com/s-zeng/dhall-python"
12+
requires-python = ">=3.10"
1013
keywords = ["dhall", "python"]
1114
classifiers = [
1215
"Development Status :: 4 - Beta",
1316
"Intended Audience :: Developers",
14-
"License :: OSI Approved :: Apache Software License",
15-
"License :: OSI Approved",
1617
"Operating System :: MacOS",
1718
"Operating System :: Microsoft :: Windows",
1819
"Operating System :: POSIX :: Linux",
1920
"Programming Language :: Python :: 3",
2021
]
2122

22-
[tool.poetry.dependencies]
23-
python = "^3.7"
24-
25-
[tool.poetry.dev-dependencies]
26-
pytest = "~=7.0"
27-
pylint = "~=2.6"
28-
flake8 = "~=5.0"
29-
wheel = "*"
30-
pytest-runner = "*"
31-
pytest-benchmark = "*"
32-
hypothesis = "*"
33-
autopep8 = "*"
34-
maturin = "~=1.1"
23+
[project.urls]
24+
repository = "https://github.com/s-zeng/dhall-python"
3525

3626
[build-system]
37-
requires = ["maturin"]
27+
requires = ["maturin>=1.9,<2"]
3828
build-backend = "maturin"
3929

4030
[tool.maturin]
4131
compatibility = "manylinux_2_24"
4232
skip-auditwheel = false
4333
sdist-include = ["dhall/*"]
34+
35+
[dependency-groups]
36+
dev = [
37+
"pytest>=9,<10",
38+
"pytest-benchmark>=5,<6",
39+
"hypothesis>=6,<7",
40+
"maturin>=1.9,<2",
41+
]

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
pkgs.mkShell {
1212
buildInputs = with pkgs; [
13-
poetry
13+
uv
1414
rustc
1515
cargo
1616
pkg-config

0 commit comments

Comments
 (0)