pipx icon indicating copy to clipboard operation
pipx copied to clipboard

feat: add --with option to "pipx run" command

Open pabloyoyoista opened this issue 3 months ago • 3 comments

  • [x] I have added a news fragment under changelog.d/ (if the patch affects the end users)

Summary of changes

Added the option in argparse for pipx run, and used inject_dep

Test plan

I've used test-driven development, and there is a test for a simple case that should prove this feature is working

TODOs:

  • [x] If this approach is considered acceptable, refactor _download_and_run to just download, so that we can inject the dependency also in the cases where the if venv.has_app == True branch in run_package
  • [x] Given this approach is considered acceptable, add parametrized tests

Closes https://github.com/pypa/pipx/issues/1607

pabloyoyoista avatar Sep 09 '25 15:09 pabloyoyoista

Thanks a lot for running the tests! I'm a bit confused about the macos failure though (https://github.com/pypa/pipx/actions/runs/17588256767/job/50365801078?pr=1666). It seems related to the code here, but I fail to see why it fails there. Any tips you might be able to have?

pabloyoyoista avatar Sep 17 '25 07:09 pabloyoyoista

It seems related to the code here

It's not related to your code here, it also failed in every other PRs. Don't worry! :D

dukecat0 avatar Sep 17 '25 08:09 dukecat0

CI green :partying_face:

pabloyoyoista avatar Oct 02 '25 16:10 pabloyoyoista