Opened at 2014-03-29T00:00:22Z
Closed at 2020-01-17T15:16:46Z
#2210 closed defect (wontfix)
'sudo pip install .' fails if tests have been run
Reported by: | daira | Owned by: | dstufft |
---|---|---|---|
Priority: | normal | Milestone: | undecided |
Component: | packaging | Version: | 1.10.0 |
Keywords: | pip install | Cc: | |
Launchpad Bug: |
Description
$ sudo pip install . Unpacking /home/davidsarah/tahoe/git/trunk Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 139, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 266, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1033, in prepare_files self.unpack_url(url, location, self.is_download) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1157, in unpack_url return unpack_file_url(link, loc) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 388, in unpack_file_url shutil.copytree(source, location) File "/usr/lib/python2.7/shutil.py", line 208, in copytree raise Error, errors Error: [('/home/davidsarah/tahoe/git/trunk/_trial_temp/allmydata.test.test_cli/Backup/test_ignore_symlinks/Rq5UpD/home/foo2.txt', '/tmp/pip-XHkVmO-build/_trial_temp/allmydata.test.test_cli/Backup/test_ignore_symlinks/Rq5UpD/home/foo2.txt', "[Errno 2] No such file or directory: '/home/davidsarah/tahoe/git/trunk/_trial_temp/allmydata.test.test_cli/Backup/test_ignore_symlinks/Rq5UpD/home/foo2.txt'"), ('/home/davidsarah/tahoe/git/trunk/_trial_temp/cli/Cp/dangling_symlink_vs_recursion/dir/link', '/tmp/pip-XHkVmO-build/_trial_temp/cli/Cp/dangling_symlink_vs_recursion/dir/link', "[Errno 2] No such file or directory: '/home/davidsarah/tahoe/git/trunk/_trial_temp/cli/Cp/dangling_symlink_vs_recursion/dir/link'")]
Change History (6)
comment:1 Changed at 2014-03-29T21:19:05Z by zooko
comment:2 Changed at 2014-04-02T23:52:27Z by daira
Note that this doesn't happen when installing from an sdist (because sdists don't contain _trial_temp); it only happens when installing directly from a checkout on which tests have been run. So it is reasonable for MANIFEST.in not to be consulted, since, IIUC, the purpose of MANIFEST.in is only to determine what goes into an sdist. However, I don't understand why pip is looking at directories that were not specified in the call to setuptools.setup.
comment:3 Changed at 2014-04-03T00:31:10Z by daira
- Owner set to dstufft
Reassigning to dstufft for an explanation of why pip does what it does.
comment:4 Changed at 2014-04-14T23:07:29Z by daira
To work around this, run make clean. (On Windows, run del /s /q _trial_temp*.)
comment:5 Changed at 2015-01-14T00:32:02Z by daira
#2104 was a duplicate.
comment:6 Changed at 2020-01-17T15:16:46Z by exarkun
- Resolution set to wontfix
- Status changed from new to closed
No one should sudo pip install and the project won't suppose this use-case.
Hm, maybe it would help if pip install would copy only the files that are supposed to be part of the sdist, i.e. those registered in the MANIFEST.in file, instead of all files currently in the filesystem.