Convert setup_py to a task.

Review Request #1394 — Created Nov. 24, 2014 and submitted

benjyw
pants
e26efdd...
pants-reviews
ity, jsirois, patricklaw, zundel

Convert setup_py to a task.

Doesn't yet delete the old setup_py command. We'll do that once this code is in and verified to work in production.

Note that python_setup.py and test_python_setup.py are just lightly modified copies of setup_py.py and test_setup_py.py.

Modified unittests passed. CI passed: https://travis-ci.org/pantsbuild/pants/builds/41944835.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
PA
  1. 
      
  2. This should not happen in __init__.

  3. 
      
BE
BE
  1. 
      
  2. Remind me why? Because of generated targets?

    1. Yeah. And in general, in the lifecycle of Task we shouldn't be dealing with the build graph or target roots. That should only ever happen in execute(), except in some very advanced and careful tricks that can be done in resolve(). It is only by legacy and coincidence (not contract), that we have the build graph and target roots more or less populated by the time we call Task.__init__ (because it takes context).

    2. typo: "...we shouldn't be dealing with the build graph or target roots in __init__."

  3. 
      
ZU
BE
BE
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 51a436ddf53b283a8a01bc0ee7728b47a6fd59aa.
Loading...