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

Copy locally build .whl files to dist dir when 'binary' goal is invoked. #5749

Merged
merged 4 commits into from May 7, 2018

Conversation

Projects
None yet
2 participants
@UnrememberMe
Copy link
Contributor

UnrememberMe commented Apr 25, 2018

Problem

build_local_python_distributions generates a wheel artifact, but users can not access it from dist folder.

Solution

copy the generated wheel to dist folder when 'binary' goal is invoked.

Result

locally generated wheel artifacts exists in dist folder.

Roger Jiang
@stuhood
Copy link
Member

stuhood left a comment

Thanks! Minor comments.

Also, there is a legit CI failure.

@@ -64,4 +65,5 @@ def register_goals():
task(name='py', action=PythonRepl).install('repl')
task(name='setup-py', action=SetupPy).install()
task(name='py', action=PythonBinaryCreate).install('binary')
task(name='py-local-wheels', action=LocalPythonDistributionArtifact).install('binary')

This comment has been minimized.

@stuhood

stuhood Apr 26, 2018

Member

The local bit isn't adding much here... maybe just py-wheels?

This comment has been minimized.

@UnrememberMe

UnrememberMe Apr 26, 2018

Contributor

done.

for base_name in base_names:
wheel_output = os.path.join(output_dir, base_name)
self.context.log.debug('found local built wheels {}'.format(wheel_output))
# Create a copy for wheel in dist dir..

This comment has been minimized.

@stuhood

stuhood Apr 26, 2018

Member

extra period

This comment has been minimized.

@UnrememberMe

UnrememberMe Apr 26, 2018

Contributor

done.

for t in dist_targets:
# Copy generated wheel files to dist folder
safe_mkdir(self.dist_dir) # Make sure dist dir is present.
local_wheels_product = self.context.products.get('local_wheels')

This comment has been minimized.

@stuhood

stuhood Apr 26, 2018

Member

Could do this and the null check outside the loop.

This comment has been minimized.

@UnrememberMe

UnrememberMe Apr 26, 2018

Contributor

done.

Roger Jiang
@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Apr 26, 2018

There is a different legit CI failure.

Recommend enabling the git hooks to catch these during development: build-support/bin/setup.sh see https://www.pantsbuild.org/howto_contribute.html#getting-pants-source-code for more information.

Roger Jiang
@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Apr 27, 2018

Again =/

Roger Jiang
@UnrememberMe

This comment has been minimized.

Copy link
Contributor

UnrememberMe commented Apr 28, 2018

g2k.

@stuhood stuhood merged commit 7f2fc97 into pantsbuild:master May 7, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment