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

switch 'pip install .' to use sdists, not copytree #3615

Closed
wants to merge 2 commits into from

Commits on Apr 13, 2016

  1. Fix/use 4e6d935 commit

    xavfernandez authored and warner committed Apr 13, 2016
    Configuration menu
    Copy the full SHA
    f1c6668 View commit details
    Browse the repository at this point in the history
  2. Copy setup.py into place too.

    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
    warner committed Apr 13, 2016
    Configuration menu
    Copy the full SHA
    d3c47bb View commit details
    Browse the repository at this point in the history