Skip to content

Commit

Permalink
fix: same interpreter from venv to get pkg name (#957)
Browse files Browse the repository at this point in the history
  • Loading branch information
lecardozo authored Mar 24, 2023
1 parent 1675103 commit 2d713f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 2d713f5

Please sign in to comment.