Resolve symlinks when generating sdists.

Review Request #3689 - Created April 13, 2016 and submitted

Information
John Sirois
pants
jsirois/issues/2814
2814, 3186
Reviewers
pants-reviews
benjyw, kwlzn
Previously pants would link symlinks as-is into sdist chroots.  Combined
with the fact pants depends on an old setuptools that does not follow
symlinks when creating sdists, this led to sdists with dangling links.
Control the behavior by having pants copy into the sdist chroot instead
of linking to ensure a valid final sdist with resolved files.

 src/python/pants/backend/python/tasks/setup_py.py             |  8 ++++----
 tests/python/pants_test/backend/python/tasks/test_setup_py.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 50 insertions(+), 6 deletions(-)

Failed before the fix, green now:

./pants test tests/python/pants_test/backend/python/tasks/:setup_py

Also still green: ./build-support/bin/release.sh -n.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/122867911

John Sirois
John Sirois
Benjy Weinberger
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit e621bc59194cd344a5b9c04680786b12195ca881
Author: John Sirois <john.sirois@gmail.com>
Date:   Wed Apr 13 19:31:40 2016 -0600

    Resolve symlinks when generating sdists.
    
    Previously pants would link symlinks as-is into sdist chroots.  Combined
    with the fact pants depends on an old setuptools that does not follow
    symlinks when creating sdists, this led to sdists with dangling links.
    Control the behavior by having pants copy into the sdist chroot instead
    of linking to ensure a valid final sdist with resolved files.
    
    Testing Done:
    Failed before the fix, green now:
    ```
    ./pants test tests/python/pants_test/backend/python/tasks/:setup_py
    ```
    
    Also still green: `./build-support/bin/release.sh -n`.
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/122867911
    
    Bugs closed: 2814, 3186
    
    Reviewed at https://rbcommons.com/s/twitter/r/3689/
Loading...