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

fix: same interpreter from venv to get pkg name #957

Merged
merged 4 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## dev

- Fallback to user's log path if the default log path (`$PIPX_HOME/logs`) is not writable to aid with pipx being used for multi-user (e.g. system-wide) installs of applications
- Fix wrong interpreter usage when injecting local pip-installable dependencies into venvs

## 1.2.0

Expand Down
6 changes: 5 additions & 1 deletion src/pipx/commands/inject.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import sys
from pathlib import Path
from typing import List, Optional
Expand Down Expand Up @@ -47,7 +48,10 @@ def inject_dep(
# zip file, or tar.gz file.
if package_name is None:
package_name = package_name_from_spec(
package_spec, venv.python, pip_args=pip_args, verbose=verbose
package_spec,
os.fspath(venv.python_path),
pip_args=pip_args,
verbose=verbose,
)

venv.install_package(
Expand Down