Automatically add global tools to PATH
morags opened this issue ยท 4 comments
When installing a tool using rye tools install
, the path to the tool should be automatically appended to the environment PATH ($PATH or %PATH%), so it is accessible globally with no further configuration.
rye tools installs binaries into ~/.rye/shims which should already be in the path when rye is configured (if rye itself is in the path)
Then it must be bug. I have the shims for Python and Rye itself, but not for the tools. The tools are being installed (I can use them from ~/.rye/tools), but I get an error before the shims are inserted:
Installed 1 package in 12ms
+ ruff==0.6.3
error: failed to resolve manifest
Caused by:
expected value at line 1 column 1
Thanks. It's an error from the following file, and it's running the following (linked) python script trying to do [something] on the installed package.
Line 28 in 6067894
Would probably be good to have full information for this bug report - rye --version output, command output with RUST_LOG=trace and information about python versions used.
Python 3.12.4 (via Rye)
rye 0.39.0
commit: 0.39.0 (bf3ccf8 2024-08-21)
platform: windows (x86_64)
self-python: cpython@3.12.4
symlink support: true
uv enabled: true
> rye install ruff
DEBUG uv 0.3.0
DEBUG Checking for Python interpreter at path `C:\Users\<user>\.rye\py\cpython@3.12.5\python.exe`
TRACE Cached interpreter info for Python 3.12.5, skipping probing: C:\Users\<user>\.rye\py\cpython@3.12.5\python.exe
DEBUG uv 0.3.0
DEBUG Searching for Python interpreter in system path or `py` launcher
TRACE Cached interpreter info for Python 3.12.5, skipping probing: C:\Users\<user>\.rye\tools\ruff\Scripts\python.exe
DEBUG Found `cpython-3.12.5-windows-x86_64-none` at `C:\Users\<user>\.rye\tools\ruff\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.12.5 environment at C:\Users\<user>\.rye\tools\ruff\Scripts\python.exe
TRACE Checking lock for `C:\Users\<user>\.rye\tools\ruff`
DEBUG Acquired lock for `C:\Users\<user>\.rye\tools\ruff`
DEBUG At least one requirement is not satisfied: ruff
DEBUG Using request timeout of 30s
DEBUG Solving with installed Python version: 3.12.5
โ Resolving dependencies...
DEBUG Adding direct dependency: ruff*
INFO add_decision: root @ 0a0.dev0
TRACE Fetching metadata for ruff from https://pypi.org/simple/ruff/
TRACE cached request https://pypi.org/simple/ruff/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/ruff/
TRACE Received package metadata for: ruff
DEBUG Searching for a compatible version of ruff (*)
TRACE Selecting candidate for ruff with range * with 316 remote versions
TRACE Selecting candidate for ruff with range * with 316 remote versions
TRACE found candidate for package PackageName("ruff") with range Range { segments: [(Unbounded, Unbounded)] } after 1 steps: "0.6.3" version
TRACE found candidate for package PackageName("ruff") with range Range { segments: [(Unbounded, Unbounded)] } after 1 steps: "0.6.3" version
TRACE cached request https://files.pythonhosted.org/packages/55/ce/061c605b1dfb52748d59bc0c7a8507546c178801156415773d18febfd71d/ruff-0.6.3-py3-none-win_amd64.whl.metadata is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 365000000s
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/55/ce/061c605b1dfb52748d59bc0c7a8507546c178801156415773d18febfd71d/ruff-0.6.3-py3-none-win_amd64.whl.metadata
DEBUG Selecting: ruff==0.6.3 [compatible] (ruff-0.6.3-py3-none-win_amd64.whl)
TRACE Received built distribution metadata for: ruff==0.6.3
โ ruff==0.6.3
INFO add_decision: ruff @ 0.6.3
DEBUG Tried 1 versions: ruff 1
DEBUG Split specific environment resolution took 0.014s
TRACE Resolution: ROOT -> ruff
TRACE Resolution: 0a0.dev0 -> 0.6.3
Resolved 1 package in 22ms
DEBUG Requirement already cached: ruff==0.6.3
โโโโโโโโโโโโโโโโโโโโ [0/1] Installing wheels...
DEBUG Extracting file name=PackageName("ruff")
DEBUG Extracted 7 files name=PackageName("ruff")
DEBUG No entrypoints name=PackageName("ruff")
DEBUG Installing data name=PackageName("ruff")
DEBUG Writing extra metadata name=PackageName("ruff")
DEBUG Writing record name=PackageName("ruff")
Installed 1 package in 19ms
+ ruff==0.6.3
error: failed to resolve manifest
Caused by:
expected value at line 1 column 1