typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Install ts_utils editable

Open srittau opened this issue 1 year ago • 1 comments

srittau avatar Oct 14 '24 19:10 srittau

Might need an update of our requirements validation to special case this. But if it works as expected it would be great and basically remove the last disadvantage of this technique.

Avasam avatar Oct 16 '24 17:10 Avasam

I've been considering moving our dev dependencies to a pyproject.toml. And using builtin toml solutions to read/parse deps rather that our custom per-line read-and-validate solution.

Now that pip supports PEP 735: https://github.com/pypa/pip/pull/13065, we could declare a proper dev dependency group.

Edit: I am realizing that there's no standard way to have a local file editable install in pyproject dependencies. Looks like a hole in the spec. uv does it like this:

[dependency-groups]
dev = [
    # Utilities for typeshed infrastructure scripts.
    "ts-utils",
]

[tool.uv.sources]
ts-utils = { path = "lib", editable = true }

Which would force us to tell contributors to pre-emptively install uv, rather than it being installed with pip install --group=dev :/ I love uv, but I appreciate that we still use it optionally as a drop-in replacement for pip.

Edit 2: I was getting somewhere, but this is also blocker in uv, unless we force using uv: https://github.com/astral-sh/uv/issues/9258#issuecomment-2705491878 & https://github.com/astral-sh/uv/issues/9683#issuecomment-2705480073

Avasam avatar Mar 07 '25 01:03 Avasam