Skip to content

Commit

Permalink
Rename deprecated tool.poetry.dev-dependencies section (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
srstevenson authored and antoinebrl committed Jan 28, 2025
1 parent dd9908c commit 057a7a9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
14 changes: 13 additions & 1 deletion .changelog/_unreleased.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ author = "[email protected]"
[[entries]]
id = "00ded573-ed92-4aab-b480-e21589718bbd"
type = "fix"
description = "Remove used of deprecated flag to be removed in pip 25.1"
description = "Remove use of deprecated flag to be removed in pip 25.1"
author = "[email protected]"

[[entries]]
Expand All @@ -45,3 +45,15 @@ id = "dddb0086-94f2-4b18-b73d-9816b2fc296f"
type = "improvement"
description = "[uv] Inject index environment variables to subprocesses"
author = "[email protected]"

[[entries]]
id = "4d8e2872-d32f-4747-b2d6-aa5c1cb4ec75"
type = "fix"
description = "Rename deprecated tool.poetry.dev-dependencies section"
author = "[email protected]"

[[entries]]
id = "6a2d1204-cc1d-43f1-9b45-577aec55a104"
type = "improvement"
description = "Directly call `uv build` even when no \\[build-system\\] is specified"
author = "[email protected]"
2 changes: 1 addition & 1 deletion kraken-build/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typing-extensions = ">=4.6.0"
loguru = "^0.7.2"
uv = "^0.5.20"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
localimport = "^1.7.6"
pyartifactory = "^2.0.0"
pytest = ">=6.0.0"
Expand Down
34 changes: 4 additions & 30 deletions kraken-build/src/kraken/std/python/buildsystem/uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import logging
import os
import shutil
import subprocess as sp
import tempfile
from collections.abc import Sequence
from dataclasses import dataclass
from pathlib import Path
Expand Down Expand Up @@ -230,34 +228,10 @@ def requires_login(self) -> bool:
# TODO: Implement bump_version()

def build_v2(self, settings: PythonSettings, output_directory: Path) -> list[Path]:
"""
Uses [build] `>=1.0.0,<2.0.0` to build a distribution of the Python project.
[build]: https://pypi.org/project/build/
"""

with tempfile.TemporaryDirectory() as tempdir:
command = [
"uv",
"tool",
"run",
"--from",
"build>=1.0.0,<2.0.0",
"pyproject-build",
"-v",
"--outdir",
tempdir,
"--installer",
"uv",
]
_run_with_uv_indexes(command, settings, self.project_directory)

src_files = list(Path(tempdir).iterdir())
dst_files = [output_directory / path.name for path in src_files]
for src, dst in zip(src_files, dst_files, strict=True):
shutil.move(str(src), dst)

return dst_files
_run_with_uv_indexes(
["uv", "build", f"--out-dir={output_directory.absolute()}"], settings, self.project_directory
)
return list(f for f in output_directory.iterdir() if f.is_file() and not f.name.startswith("."))

def get_lockfile(self) -> Path | None:
return self.project_directory / "uv.lock"
Expand Down
2 changes: 1 addition & 1 deletion kraken-wrapper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ python = ">=3.10"
termcolor = "^2.3.0"
uv = "^0.5.0"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
pytest = ">=6.0.0"

[tool.poetry.scripts]
Expand Down

0 comments on commit 057a7a9

Please sign in to comment.