Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Install from source (manual trigger)
run: |
uv pip install .[develop]
uv pip install -e ".[develop]"
uv pip install "yardang[themes]"
if: github.event_name == 'workflow_dispatch'

Expand Down
1 change: 1 addition & 0 deletions python/pure/.gitignore.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ celerybeat.pid
# Environments
.env
.venv
uv.lock
env/
venv/
ENV/
Expand Down
19 changes: 9 additions & 10 deletions python/pure/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
.PHONY: develop build install

develop: ## install dependencies and build library
uv pip install -e .[develop]
uv pip install -e ".[develop]"

requirements: ## install prerequisite python build requirements
python -m pip install --upgrade pip toml
python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))'`
python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print(" ".join(c["project"]["optional-dependencies"]["develop"]))'`
requirements: ## install development dependencies
uv pip install -r pyproject.toml --extra develop

build: ## build the python library
python -m build -n
uv build

install: ## install library
uv pip install .
Expand Down Expand Up @@ -49,7 +47,8 @@ format: fix
.PHONY: check-dist check-types checks check

check-dist: ## check python sdist and wheel with check-dist
check-dist -v
uv build
check-dist -v --pre-built dist

check-types: ## check python types with ty
ty check --python $$(which python)
Expand Down Expand Up @@ -96,10 +95,10 @@ major: ## bump a major version
.PHONY: dist dist-build dist-sdist dist-local-wheel publish

dist-build: # build python dists
python -m build -w -s
uv build

dist-check: ## run python dist checker with twine
python -m twine check dist/*
dist-check: ## check built python distributions
check-dist -v --pre-built dist

dist: clean dist-build dist-check ## build all dists

Expand Down
5 changes: 0 additions & 5 deletions python/pure/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,15 @@ dependencies = []

[project.optional-dependencies]
develop = [
"build",
"bump-my-version",
"check-dist",
"codespell",
"hatchling",
"mdformat",
"mdformat-tables>=1",
"pytest",
"pytest-cov",
"ruff",
"twine",
"ty",
"uv",
"wheel",
]

[project.scripts]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ cd {{ project_name_formatted }}

## Install Python dependencies

Python build and develop dependencies are specified in the `pyproject.toml`, but you can manually install them:
Python development and test dependencies are published in the `develop` extra in `pyproject.toml`. Install them with `uv`:

```bash
make requirements
```

Note that these dependencies would otherwise be installed normally as part of [PEP517](https://peps.python.org/pep-0517/) / [PEP518](https://peps.python.org/pep-0518/).
Build dependencies are installed separately in an isolated environment as part of [PEP517](https://peps.python.org/pep-0517/) / [PEP518](https://peps.python.org/pep-0518/).

## Build

Expand Down
4 changes: 2 additions & 2 deletions python/rust/rust/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
requirements: ## install required dev dependencies
rustup component add rustfmt
rustup component add clippy
cargo install --locked --force cargo-nextest
cargo install --force cargo-llvm-cov
cargo install --locked cargo-nextest --version 0.9.143
cargo install --locked cargo-llvm-cov --version 0.8.7

develop: requirements ## install required dev dependencies

Expand Down
Loading