A setup_py task for the new python pipeline. #4308

Merged
merged 2 commits into from Mar 6, 2017

Conversation

Projects
None yet
2 participants
@benjyw
Contributor

benjyw commented Mar 6, 2017

Copied from the old one, with the previous special-casing of
codegen removed (the new python tasks don't invoke
codegen directly like the old ones did).

However this task does still require some special handling of
codegen: when selecting the targets to operate on we have to
replace any codegen target roots with their corresponding
synthetic targets, as those are the ones with the actual sources
to publish.

This change also copies the old task's unit tests, except the
ones pertaining to codegen (which would no longer work without
setting up and running codegen tasks in the tests).
Instead, this change adds an integration test that ensures that we
create an appropriate sdist from codegen targets, thus exercising
the special handling mentioned above (and incidentally also verifying
that our new pipeline does do the right thing regarding synthesizing
library targets for generated code).

A setup_py task for the new python pipeline.
Copied from the old one, with the previous special-casing of
codegen removed (since codegen targets are just producers of
source code products now, the new python tasks don't invoke
codegen directly like the old ones do).

However this task does still require some special handling of
codegen - when selecting the targets to operate on we have to
replace any codegen target roots with their corresponding
synthetic targets.

This change also copies the old task's unit tests, except the
ones pertaining to codegen, which would no longer work without
setting up and running codegen tasks.  Instead, this change
adds a regression test that ensures that we create an appropriate
sdist from codegen targets, thus exercising the special handling
mentioned above.

@benjyw benjyw requested review from kwlzn and jsirois Mar 6, 2017

@kwlzn

kwlzn approved these changes Mar 6, 2017

lgtm!

+from pants_test.pants_run_integration_test import PantsRunIntegrationTest
+
+
+class PythonReplIntegrationTest(PantsRunIntegrationTest):

This comment has been minimized.

@kwlzn

kwlzn Mar 6, 2017

Member

s/Repl/SetupPy/ ?

@kwlzn

kwlzn Mar 6, 2017

Member

s/Repl/SetupPy/ ?

This comment has been minimized.

@benjyw

benjyw Mar 6, 2017

Contributor

D'oh! Sucking at copypasta is a rare achievement indeed... :)

@benjyw

benjyw Mar 6, 2017

Contributor

D'oh! Sucking at copypasta is a rare achievement indeed... :)

@benjyw benjyw merged commit f18c556 into pantsbuild:master Mar 6, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details

@benjyw benjyw deleted the benjyw:new_pipeline_setup_py branch Mar 6, 2017

lenucksi added a commit to lenucksi/pants that referenced this pull request Apr 25, 2017

A setup_py task for the new python pipeline. (#4308)
Copied from the old one, with the previous special-casing of
codegen removed (the new python tasks don't invoke
codegen directly like the old ones did).

However this task does still require some special handling of
codegen: when selecting the targets to operate on we have to
replace any codegen target roots with their corresponding
synthetic targets, as those are the ones with the actual sources
to publish.

This change also copies the old task's unit tests, except the
ones pertaining to codegen (which would no longer work without
setting up and running codegen tasks in the tests).
Instead, this change adds an integration test that ensures that we
create an appropriate sdist from codegen targets, thus exercising
the special handling mentioned above (and incidentally also verifying
that our new pipeline does do the right thing regarding synthesizing
library targets for generated code).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment