Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This works around a problem with the new sdist-based "pip install .": * when creating the sdist, we don't run a literal "setup.py sdist" * instead, sys.argv[0] is a complicated shim that injects setuptools even into distutils-based projects * as a result, distutils.command.sdist.add_defaults() doesn't realize that "setup.py" is the name of its setup script (it gets confused because sys.argv[0] is not a real file). * so add_defaults() doesn't include setup.py in the generated tarball. (projects could add "include setup.py" to their MANIFEST.in, but this is not common practice because usually it's automatic) * so the unpacked sdist (from which pip will make a wheel) lacks the critical setup.py This copies the setup.py from source tree to unpacked target tree. The patch also removes a performance comment that was obsoleted by switching to _copy_dist_from_dir(). refs pypa#2195, pypa#2535, pypa#3176
- Loading branch information