rhythmic-glass-66959
07/27/2022, 1:36 PMpython_distribution
(wheel) into a Dockerfile built by pants?./pants package
, and placed in the context using the artifact's output_path
field.
⦠The output_path
defaults to the scheme <http://path.to|path.to>.directory/tgt_name.ext
, e.g. src.python.helloworld/bin.pex
.nutritious-minister-3808
07/27/2022, 1:44 PMCOPY <http://path.to|path.to>.directory/tgt_name.whl /opt/destination/directory
.rhythmic-glass-66959
07/27/2022, 1:45 PMpython_distribution(
name="dist",
provides=python_artifact(
name="my_package",
version="0.1.0",
),
)
COPY <http://src.python.my|src.python.my>_package/dist.whl /tmp
failed (file does not exist).nutritious-minister-3808
07/27/2022, 1:47 PMCOPY <http://src.python.my|src.python.my>_package/my-package-0.1.0.whl /tmp
rhythmic-glass-66959
07/27/2022, 1:48 PMnutritious-minister-3808
07/27/2022, 1:51 PM./pants package src/python:dist
":dist"
as a dependency on the docker_image target?rhythmic-glass-66959
07/27/2022, 1:52 PMdocker_image(
name="my_docker_image",
dependencies=[
...
"src/python/my_package:dist",
],
)
./pants package src/python/my_package:dist
09:56:17.93 [INFO] Wrote dist/my_package-0.1.0-py3-none-any.whl
09:56:17.93 [INFO] Wrote dist/my_package-0.1.0.tar.gz
nutritious-minister-3808
07/27/2022, 1:59 PMCOPY my_package-0.1.0-py3-none-any.whl /tmp
should do itrhythmic-glass-66959
07/27/2022, 2:00 PMbitter-ability-32190
07/27/2022, 2:05 PMoutput_path
field to python_distribution
.rhythmic-glass-66959
07/27/2022, 2:05 PMpython_distribution
doesn't follow the documented scheme...bitter-ability-32190
07/27/2022, 2:06 PM./pants package ...
and inspect where it is located in the dist
dir. That'll be reflected in the docker context
⢠Use ./pants --no-process-cleanup ...
and inspect the sandbox created for the docker build
process