fresh-tomato-66784
01/29/2020, 8:59 PMrequirement.txt
tar.gz
or wheel
.
Any recommendations for this use case? In an ideal case, would prefer to build a single pex that can run locally and later submit to cloud.fresh-tomato-66784
01/29/2020, 9:08 PMhappy-kitchen-89482
01/29/2020, 10:19 PMhappy-kitchen-89482
01/29/2020, 10:20 PMfresh-tomato-66784
01/29/2020, 10:21 PMhappy-kitchen-89482
01/29/2020, 10:21 PM./pants setup-py
, does that not work? Its metadata will list the right dependencies.fresh-tomato-66784
01/29/2020, 10:24 PMfresh-tomato-66784
01/29/2020, 10:30 PMhappy-kitchen-89482
01/29/2020, 11:10 PMhappy-kitchen-89482
01/29/2020, 11:10 PMfresh-tomato-66784
01/29/2020, 11:31 PMfresh-tomato-66784
01/29/2020, 11:50 PMhappy-kitchen-89482
01/30/2020, 1:07 AMhappy-kitchen-89482
01/30/2020, 1:07 AMtar.gz
filehappy-kitchen-89482
01/30/2020, 1:07 AMfresh-tomato-66784
01/30/2020, 1:53 AMhappy-kitchen-89482
01/30/2020, 2:52 AMfresh-tomato-66784
01/30/2020, 7:15 AMpip install xx.tar.gz
behind it.
This doc have a good explanation around this
https://beam.apache.org/documentation/sdks/python-pipeline-dependencies/fresh-tomato-66784
01/30/2020, 9:31 AMhappy-kitchen-89482
01/30/2020, 7:02 PMhappy-kitchen-89482
01/30/2020, 7:02 PMhappy-kitchen-89482
01/30/2020, 7:05 PMhappy-kitchen-89482
01/30/2020, 7:05 PMhappy-kitchen-89482
01/30/2020, 7:09 PMjob1/BUILD:
python_library(
dependencies='some/lib',
provides=setup_py(name='cruise.job1', version='1.2.3')
)
job2/BUILD:
python_library(
dependencies='some/lib',
provides=setup_py(name='cruise.job2', version='4.5.6')
)
some/lib/BUILD:
python_library(
provides=setup_py(name='cruise.lib', version='7.8.9'
)
happy-kitchen-89482
01/30/2020, 7:10 PMjob1
will have cruise.lib==7.8.9
in its requirements (Pants figures that out for you), so cruise.lib
needs to be published somewhere Dataflow can see it, even if cruise.job1
is not published but just uploaded directly. cruise.lib
becomes a regular external requirement to it, see what I mean?happy-kitchen-89482
01/30/2020, 7:12 PMpython_library
targets in a single dist (a lib will be published in the dist provided by the closest ancestor that depends on it and has a provides=
clause). So you don't need one-dist-per-target, that would be nuts. But you do still need to publish those inner dists, which is probably not what you want here?happy-kitchen-89482
01/30/2020, 7:13 PMfresh-tomato-66784
01/30/2020, 9:41 PMhappy-kitchen-89482
01/30/2020, 9:42 PMhappy-kitchen-89482
01/30/2020, 9:42 PMhappy-kitchen-89482
01/30/2020, 9:42 PMpython_library
targets in your repo.happy-kitchen-89482
01/30/2020, 9:42 PMprovides=
stanza.happy-kitchen-89482
01/30/2020, 9:44 PMhappy-kitchen-89482
01/30/2020, 9:44 PMpython_library
target T, how do we decide which target ET exports it?happy-kitchen-89482
01/30/2020, 9:46 PMhappy-kitchen-89482
01/30/2020, 9:47 PMhappy-kitchen-89482
01/30/2020, 9:47 PMhappy-kitchen-89482
01/30/2020, 9:48 PMhappy-kitchen-89482
01/30/2020, 9:48 PMhappy-kitchen-89482
01/30/2020, 9:48 PMfresh-tomato-66784
01/30/2020, 11:21 PMhappy-kitchen-89482
01/30/2020, 11:47 PM