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

pipx install --force not overwriting correctly #582

Closed
vikigenius opened this issue Dec 9, 2020 · 4 comments · Fixed by #933
Closed

pipx install --force not overwriting correctly #582

vikigenius opened this issue Dec 9, 2020 · 4 comments · Fixed by #933
Labels
enhancement New feature or request

Comments

@vikigenius
Copy link

Describe the bug

Given a previously installed release version of a package. If you try to install the latest version from github. The changes to the code are not reflected.

How to reproduce

  1. Install release version of dotdrop. pipx install dotdrop
  2. Install latest version of dotdrop: pipx install git+https://github.com/deadc0de6/dotdrop.git --force --verbose
pipx > (setup:567): pipx version is 0.15.6.0
pipx > (setup:568): Default python interpreter is '/usr/bin/python3'
pipx > (_parsed_package_to_package_or_url:127): cleaned package spec: git+https://github.com/deadc0de6/dotdrop.git
creating virtual environment...
pipx > (run_subprocess:113): running /usr/bin/python3 -m venv --without-pip /tmp/tmpgbz54nkp
pipx > (run_subprocess:113): running /tmp/tmpgbz54nkp/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx > (run_subprocess:113): running /home/void/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx > (run_subprocess:113): running /tmp/tmpgbz54nkp/bin/python --version
determining package name from 'git+https://github.com/deadc0de6/dotdrop.git'...
pipx > (run_subprocess:113): running /tmp/tmpgbz54nkp/bin/python -m pip list --format=json
pipx > (run_subprocess:113): running /tmp/tmpgbz54nkp/bin/python -m pip install --no-dependencies git+https://github.com/deadc0de6/dotdrop.git
Collecting git+https://github.com/deadc0de6/dotdrop.git
  Cloning https://github.com/deadc0de6/dotdrop.git to /tmp/pip-req-build-wm0gdz8f
Building wheels for collected packages: dotdrop
  Building wheel for dotdrop (setup.py) ... done
  Created wheel for dotdrop: filename=dotdrop-1.4.1-py3-none-any.whl size=67535 sha256=e861fa97b66e5a5063b7b2c019e7f3e2158834c8c06c4f17cfadd9ed1bc96106
  Stored in directory: /tmp/pip-ephem-wheel-cache-wmopwjqi/wheels/22/ce/6b/6b4169ca050b42a312ae49845c795e2c65a9f4169e3872da52
Successfully built dotdrop
Installing collected packages: dotdrop
Successfully installed dotdrop-1.4.1
pipx > (run_subprocess:113): running /tmp/tmpgbz54nkp/bin/python -m pip list --format=json
pipx > (install_package_no_deps:246): Determined package name: dotdrop
pipx > (package_name_from_spec:261): Package name determined in 2.5s
Installing to existing directory '/home/void/.local/pipx/venvs/dotdrop'
pipx > (needs_upgrade:54): Time since last upgrade of shared libs, in seconds: 71544.08119940758. Upgrade will be run by pipx if greater than 2592000.0.
creating virtual environment...
pipx > (run_subprocess:113): running /usr/bin/python3 -m venv --without-pip /home/void/.local/pipx/venvs/dotdrop
pipx > (run_subprocess:113): running /home/void/.local/pipx/venvs/dotdrop/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx > (run_subprocess:113): running /home/void/.local/pipx/venvs/dotdrop/bin/python --version
pipx > (_parsed_package_to_package_or_url:127): cleaned package spec: git+https://github.com/deadc0de6/dotdrop.git
installing dotdrop from spec 'git+https://github.com/deadc0de6/dotdrop.git'...
pipx > (run_subprocess:113): running /home/void/.local/pipx/venvs/dotdrop/bin/python -m pip install git+https://github.com/deadc0de6/dotdrop.git
Collecting git+https://github.com/deadc0de6/dotdrop.git
  Cloning https://github.com/deadc0de6/dotdrop.git to /tmp/pip-req-build-l8gandc1
Requirement already satisfied: docopt in ./.local/pipx/venvs/dotdrop/lib/python3.9/site-packages (from dotdrop==1.4.1) (0.6.2)
Requirement already satisfied: Jinja2 in ./.local/pipx/venvs/dotdrop/lib/python3.9/site-packages (from dotdrop==1.4.1) (2.11.2)
Requirement already satisfied: ruamel.yaml in ./.local/pipx/venvs/dotdrop/lib/python3.9/site-packages (from dotdrop==1.4.1) (0.16.12)
Requirement already satisfied: python-magic in ./.local/pipx/venvs/dotdrop/lib/python3.9/site-packages (from dotdrop==1.4.1) (0.4.18)
Requirement already satisfied: MarkupSafe>=0.23 in ./.local/pipx/venvs/dotdrop/lib/python3.9/site-packages (from Jinja2->dotdrop==1.4.1) (1.1.1)
pipx > (run_subprocess:113): running /home/void/.local/pipx/venvs/dotdrop/bin/python -c <contents of venv_metadata_inspector.py> dotdrop /home/void/.local/pipx/venvs/dotdrop/bin
pipx > (_parsed_package_to_package_or_url:127): cleaned package spec: git+https://github.com/deadc0de6/dotdrop.git
pipx > (_symlink_package_apps:83): Force is true. Removing /home/void/.local/bin/dotdrop.
pipx > (needs_upgrade:54): Time since last upgrade of shared libs, in seconds: 71545.61652231216. Upgrade will be run by pipx if greater than 2592000.0.
  installed package dotdrop 1.4.1, Python 3.9.0
  These apps are now globally available
    - dotdrop
done! ✨ 🌟 ✨
  1. Latest changes from the master branch are not reflected. (For this case you can verify that the changes introduced by this commit deadc0de6/dotdrop@974e446 (not included in release) are not reflected in the local code.

Expected behavior

The changes introduced by the latest commit should be reflected in the local code.

@uranusjr
Copy link
Member

--force only affects whether pipx creates the virtual environment from scratch; to force pip into upgrading, you need to also pass the arguement to pip, i.e.

pipx install --force --pip-args='--force-reinstall' git+https://github.com/deadc0de6/dotdrop.git

Maybe pipx could do this automatically?

@itsayellow
Copy link
Contributor

Yes it seems that pipx install --force seems to be re-thought. Related is probably #447

@itsayellow
Copy link
Contributor

It seems like --force was originally thought of as a limited backdoor for not creating the venv, but the UI makes it seem to users as though it is applicable more broadly.

@dukecat0 dukecat0 added the duplicate This issue or pull request already exists label Sep 29, 2022
@dukecat0 dukecat0 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2022
@dukecat0 dukecat0 removed the duplicate This issue or pull request already exists label Sep 29, 2022
@dukecat0 dukecat0 reopened this Sep 29, 2022
@dukecat0 dukecat0 added the enhancement New feature or request label Sep 29, 2022
@biggestsonicfan
Copy link

Just ran into this issue.

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

Successfully merging a pull request may close this issue.

5 participants