Extract scrooge tasks to contrib/.

Review Request #1780 - Created Feb. 16, 2015 and submitted

Information
John Sirois
pants
jsirois/contrib/scrooge-gen
1101, 1114
1f3b589...
Reviewers
pants-reviews
benjyw, jinfeng, lahosken, nhoward_tw, patricklaw, zundel
This establishes a contrib tree for pants plugin contributions as
discussed here:
https://groups.google.com/d/topic/pants-devel/9EREtXy5lR4/discussion

In order to support contribs, a few changes are made to CI:

+ break out a contrib test section + flag and dedicate a travis shard
+ break out the empty __init__.py check to a script and allow for
  namespace declarations.

Also, modify the GoalRunner to support namespace packages when adding to
the `sys.path`.

The release script is ammended to hook into
`contrib/release_packages.sh` but more work needs to be done to the
`setup-py` goal to avoid re-packaging in-repo dependency source (the
pants code itself).

 .travis.yml                                                                                                                    | 23 +++++++--------
 build-support/bin/check_header.sh                                                                                              |  5 +++-
 build-support/bin/check_packages.sh                                                                                            | 36 +++++++++++++++++++++++
 build-support/bin/ci.sh                                                                                                        | 46 +++++++++++++++++-------------
 build-support/bin/isort.sh                                                                                                     | 11 ++++----
 build-support/bin/release.sh                                                                                                   |  8 +++++-
 contrib/.isort.cfg                                                                                                             |  9 ++++++
 contrib/BUILD                                                                                                                  |  6 ++++
 contrib/README.md                                                                                                              | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++
 contrib/release_packages.sh                                                                                                    | 32 +++++++++++++++++++++
 contrib/scrooge/.isort.cfg                                                                                                     |  9 ++++++
 contrib/scrooge/README.md                                                                                                      |  6 ++++
 contrib/scrooge/src/python/pants/__init__.py                                                                                   |  1 +
 contrib/scrooge/src/python/pants/contrib/__init__.py                                                                           |  1 +
 contrib/scrooge/src/python/pants/contrib/scrooge/BUILD                                                                         | 34 ++++++++++++++++++++++
 {tests/python/pants_test => contrib/scrooge/src/python/pants/contrib/scrooge}/__init__.py                                      |  0
 contrib/scrooge/src/python/pants/contrib/scrooge/register.py                                                                   | 18 ++++++++++++
 contrib/scrooge/src/python/pants/contrib/scrooge/tasks/BUILD                                                                   | 40 ++++++++++++++++++++++++++
 {tests/python/pants_test => contrib/scrooge/src/python/pants/contrib/scrooge/tasks}/__init__.py                                |  0
 {src/python/pants/backend/codegen => contrib/scrooge/src/python/pants/contrib/scrooge}/tasks/scrooge_gen.py                    |  3 +-
 {src/python/pants/backend/codegen => contrib/scrooge/src/python/pants/contrib/scrooge}/tasks/thrift_linter.py                  |  0
 contrib/scrooge/tests/python/pants_test/__init__.py                                                                            |  1 +
 contrib/scrooge/tests/python/pants_test/contrib/__init__.py                                                                    |  1 +
 {tests/python/pants_test => contrib/scrooge/tests/python/pants_test/contrib/scrooge}/__init__.py                               |  0
 contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks/BUILD                                                            | 32 +++++++++++++++++++++
 {tests/python/pants_test => contrib/scrooge/tests/python/pants_test/contrib/scrooge/tasks}/__init__.py                         |  0
 {tests/python/pants_test/backend/codegen => contrib/scrooge/tests/python/pants_test/contrib/scrooge}/tasks/test_scrooge_gen.py |  8 +++---
 {tests/python/pants_test => contrib/scrooge/tests/python/pants_test/contrib/scrooge}/tasks/test_thrift_linter_integration.py   | 34 +++++++++-------------
 {testprojects/src/thrift/com/pants => contrib/scrooge/tests/thrift/org/pantsbuild/contrib/scrooge}/thrift_linter/BUILD         |  2 +-
 {testprojects/src/thrift/com/pants => contrib/scrooge/tests/thrift/org/pantsbuild/contrib/scrooge}/thrift_linter/README        |  0
 {testprojects/src/thrift/com/pants => contrib/scrooge/tests/thrift/org/pantsbuild/contrib/scrooge}/thrift_linter/bad.thrift    |  0
 {testprojects/src/thrift/com/pants => contrib/scrooge/tests/thrift/org/pantsbuild/contrib/scrooge}/thrift_linter/good.thrift   |  0
 pants-plugins/src/python/internal_backend/BUILD                                                                                |  1 +
 pants-plugins/src/python/internal_backend/utilities/BUILD                                                                      | 12 ++++++++
 {tests/python/pants_test => pants-plugins/src/python/internal_backend/utilities}/__init__.py                                   |  0
 pants-plugins/src/python/internal_backend/utilities/register.py                                                                | 27 ++++++++++++++++++
 pants.ini                                                                                                                      | 11 +++++---
 src/python/pants/BUILD                                                                                                         | 10 -------
 src/python/pants/__init__.py                                                                                                   |  8 ------
 src/python/pants/backend/codegen/register.py                                                                                   |  7 -----
 src/python/pants/backend/codegen/tasks/BUILD                                                                                   | 39 -------------------------
 src/python/pants/bin/BUILD                                                                                                     |  1 +
 src/python/pants/bin/goal_runner.py                                                                                            |  5 +++-
 tests/python/pants_test/__init__.py                                                                                            |  1 +
 tests/python/pants_test/backend/codegen/tasks/BUILD                                                                            | 15 ----------
 tests/python/pants_test/tasks/BUILD                                                                                            | 12 --------
 46 files changed, 430 insertions(+), 162 deletions(-)
CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/51189971

Issues

  • 0
  • 0
  • 4
  • 4
Description From Last Updated
John Sirois
John Sirois
John Sirois
John Sirois
Benjy Weinberger
Larry Hosken
Dominic Hamon
Dominic Hamon
John Sirois
John Sirois
Larry Hosken
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Eric Ayers

Sorry for the late response, I looked at the READMEs and install scripts and didn't see any issues. I kept meaning to look into it further, I would have been more responsive if it had been broken into a couple of smaller reviews.

Loading...