Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically add global tools to PATH #1363

Open
morags opened this issue Aug 31, 2024 · 4 comments
Open

Automatically add global tools to PATH #1363

morags opened this issue Aug 31, 2024 · 4 comments

Comments

@morags
Copy link

morags commented Aug 31, 2024

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.

@bluss
Copy link
Contributor

bluss commented Aug 31, 2024

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)

@morags
Copy link
Author

morags commented Aug 31, 2024

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

@bluss
Copy link
Contributor

bluss commented Aug 31, 2024

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.

const FIND_SCRIPT_SCRIPT: &str = r#"

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.

@morags
Copy link
Author

morags commented Aug 31, 2024

Python 3.12.4 (via Rye)

rye 0.39.0
commit: 0.39.0 (bf3ccf8 2024-08-21)
platform: windows (x86_64)
self-python: [email protected]
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\[email protected]\python.exe`
TRACE Cached interpreter info for Python 3.12.5, skipping probing: C:\Users\<user>\.rye\py\[email protected]\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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants