Skip to content

Fix for #373 #4495

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

Merged
merged 2 commits into from
Jun 13, 2017
Merged

Fix for #373 #4495

merged 2 commits into from
Jun 13, 2017

Conversation

pradyunsg
Copy link
Member

I hope to resolve #373 in this PR.

@pradyunsg
Copy link
Member Author

pradyunsg commented May 19, 2017

@NiklasRosenstein Thanks for checking!

Could you provide a set of steps to reproduce the issue? I'd like to add a test for this behaviour to ensure it doesn't break again in the future.

@NiklasRosenstein
Copy link

NiklasRosenstein commented May 19, 2017

I've tried to reproduce the issue on Ubuntu 16.04 on Python 3.5.2 and Pip 9.0.1, but wasn't able to. I can only reproduce it on Windows 10 using the same Python and Pip versions. Again, using this command

$ pip install --prefix nodepy_modules/.pip 'appdirs>=1.4.2' 'click>=6.7' 'distlib>=0.2.4' 'hammock>=0.2.4' 'jsonschema>=2.6.0' 'requests>=2.13.0' --ignore- installed
Collecting appdirs>=1.4.2
  Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting click>=6.7
  Using cached click-6.7-py2.py3-none-any.whl
Collecting distlib>=0.2.4
  Using cached distlib-0.2.5.zip
Collecting hammock>=0.2.4
Collecting jsonschema>=2.6.0
  Using cached jsonschema-2.6.0-py2.py3-none-any.whl
Collecting requests>=2.13.0
  Using cached requests-2.14.2-py2.py3-none-any.whl
Installing collected packages: appdirs, click, distlib, requests, hammock, jsonschema
  Running setup.py install for distlib ... done
Exception:
Traceback (most recent call last):
  File "c:\users\niklas\repos\pip\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\niklas\repos\pip\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\niklas\repos\pip\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\niklas\repos\pip\pip\req\req_install.py", line 922, in install
    with open(inst_files_path, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'nodepy_modules\\.pip\\Lib\\site-packages\\distlib-0.2.5-py3.5.egg-info\\installed-files.txt'

The installation succeeds after upgrading to Pip with your patch.

niklas@DESKTOP-RQTQ13S  ~/Desktop
$ rm -r nodepy_modules/

niklas@DESKTOP-RQTQ13S  ~/Desktop
$ pip --version
pip 10.0.0.dev0 from c:\users\niklas\repos\pip (python 3.5)

niklas@DESKTOP-RQTQ13S  ~/Desktop
$ pip install --prefix nodepy_modules/.pip 'appdirs>=1.4.2' 'click>=6.7' 'distlib>=0.2.4' 'hammock>=0.2.4' 'jsonschema>=2.6.0' 'requests>=2.13.0' --ignore- installed
Collecting appdirs>=1.4.2
  Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting click>=6.7
  Using cached click-6.7-py2.py3-none-any.whl
Collecting distlib>=0.2.4
  Using cached distlib-0.2.5.zip
Collecting hammock>=0.2.4
Collecting jsonschema>=2.6.0
  Using cached jsonschema-2.6.0-py2.py3-none-any.whl
Collecting requests>=2.13.0
  Using cached requests-2.14.2-py2.py3-none-any.whl
Installing collected packages: appdirs, click, distlib, requests, hammock, jsonschema
  Running setup.py install for distlib ... done
Successfully installed appdirs-1.4.3 click-6.7 distlib-0.2.5 hammock-0.2.4 jsonschema-2.6.0 requests-2.14.2

@pradyunsg
Copy link
Member Author

Awesome! Thanks a lot!

I don't have a Windows 10 machine handy. :/

I'll add a test based on what you describe. I'm hoping I can have it breaking on master and passing on this branch. I guess I'll use AppVeyor.

@pradyunsg
Copy link
Member Author

@dstufft Can this be merged without a test?

@dstufft dstufft merged commit fc3a8e7 into pypa:master Jun 13, 2017
@pradyunsg pradyunsg deleted the installed-files-bug-373 branch June 13, 2017 19:28
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pip 1.0] No such file or directory: ... installed-files.txt
3 participants