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

Changing PEP 508 URLs in setup.py doesn't reinstall the dependency #6160

Closed
rouge8 opened this issue Jan 22, 2019 · 2 comments
Closed

Changing PEP 508 URLs in setup.py doesn't reinstall the dependency #6160

rouge8 opened this issue Jan 22, 2019 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@rouge8
Copy link
Contributor

rouge8 commented Jan 22, 2019

Environment

  • pip version: 19.0
  • Python version: 3.7.2
  • OS: macOS 10.14.2

Description

Changing a PEP 508 URL in setup.py doesn't reinstall the dependency, so can't use them to set a particular version. See example in How to Reproduce.

This seems related to #5898 and #5780 (maybe a duplicate? feel free to close if so).

Expected behavior

Changing the URL (especially the tag for VCS URLs) will install the correct version of the dependency.

How to Reproduce

  1. Create a minimal setup.py:
from setuptools import setup

setup(
    name="test-package",
    version="1.0.0",
    install_requires=[
        "pip-test-package @ https://github.com/pypa/pip-test-package/archive/0.1.1.zip"
    ],
)
  1. Run pip install -e .
  2. Update the dependency to pip-test-package @ https://github.com/pypa/pip-test-package/archive/0.1.2.zip
  3. Run pip install -e .
  4. The new version was not installed, which you can verify with pip freeze

Output

$ pip install -e .
Obtaining file:///Users/andy/tmp/pip-bug
Collecting pip-test-package@ https://github.com/pypa/pip-test-package/archive/0.1.1.zip from https://github.com/pypa/pip-test-package/archive/0.1.1.zip (from test-package==1.0.0)
  Downloading https://github.com/pypa/pip-test-package/archive/0.1.1.zip
     \ 61kB 36.2MB/s
Building wheels for collected packages: pip-test-package
  Building wheel for pip-test-package (setup.py) ... done
  Stored in directory: /private/var/folders/bw/ghklm2fs6bx_x9x_f0wg5kph0000gn/T/pip-ephem-wheel-cache-2n8m21u0/wheels/bc/f7/bf/ce391e96fea98b7815496177b5435404304409f0a3f10e9ca2
Successfully built pip-test-package
Installing collected packages: pip-test-package, test-package
  Running setup.py develop for test-package
Successfully installed pip-test-package-0.1.1 test-package
$ pip freeze
pip-test-package==0.1.1
# Editable install with no version control (test-package==1.0.0)
-e /Users/andy/tmp/pip-bug
andy at andy-goodrx in ~/tmp/pip-bug exited 1 workon tmp-bbfca53269d4978c
$ sed -i '' 's/0.1.1/0.1.2/g' setup.py
$ cat setup.py
from setuptools import setup

setup(
    name="test-package",
    version="1.0.0",
    install_requires=[
        "pip-test-package @ https://github.com/pypa/pip-test-package/archive/0.1.2.zip"
    ],
)
$ pip install -e .
Obtaining file:///Users/andy/tmp/pip-bug
Requirement already satisfied: pip-test-package@ https://github.com/pypa/pip-test-package/archive/0.1.2.zip from https://github.com/pypa/pip-test-package/archive/0.1.2.zip in /Users/andy/.virtualenvs/tmp-bbfca53269d4978c/lib/python3.7/site-packages (from test-package==1.0.0) (0.1.1)
Installing collected packages: test-package
  Found existing installation: test-package 1.0.0
    Uninstalling test-package-1.0.0:
      Successfully uninstalled test-package-1.0.0
  Running setup.py develop for test-package
Successfully installed test-package
$ pip freeze
pip-test-package==0.1.1
# Editable install with no version control (test-package==1.0.0)
-e /Users/andy/tmp/pip-bug
@pradyunsg
Copy link
Member

I'll go ahead and close this, as a duplicate of #5780.

@pradyunsg pradyunsg added the resolution: duplicate Duplicate of an existing issue/PR label Jan 23, 2019
@lock
Copy link

lock bot commented May 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants