Skip to content
Myr

♻️ Simplify build setup scripts and configs for deprecated wrapper packages (#1535)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent a73fe4d · Browse files · 2 files+3 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−16 removed

  • other:+3 added−16 removed

2 files+3 added−16 removed

modified:pdm_build.py+3 added-11 removed
8 unmodified lines
9def pdm_build_initialize(context: Context) -> None:10 metadata = context.config.metadata11 # Get main version12 version = metadata["version"]13 # Get package names to keep in sync with the same main version14 sync_dependencies: list[str] = context.config.data["tool"]["tiangolo"][15 "_internal-slim-build"16 ]["sync-dependencies"]13 # Get custom config for the current package, from the env var14 all_configs_config: dict[str, Any] = context.config.data["tool"]["tiangolo"][15 "_internal-slim-build"16 ]["packages"]
17 unmodified lines
34 dependencies: list[str] = metadata.get("dependencies", [])35 # Sync versions in dependencies36 new_dependencies = []37 for dep in dependencies:42 if dep in sync_dependencies:43 new_dep = f"{dep}>={version}"44 new_dependencies.append(new_dep)45 else:38 new_dep = f"{dep}>={version}"39 new_dependencies.append(new_dep)40 metadata["dependencies"] = new_dependencies46 new_dependencies.append(dep)47 if new_dependencies != dependencies:48 metadata["dependencies"] = new_dependencies
modified:pyproject.toml-5 removed
99 unmodified lines
100 "docs_src/",101 "scripts/",102]103104[tool.tiangolo._internal-slim-build]105sync-dependencies = [106 "typer"107]108104[tool.tiangolo._internal-slim-build.packages.typer-slim.project]105name = "typer-slim"106readme = "typer-slim/README.md"107dependencies = [
159 unmodified lines