diff --git a/helloworld/BUILD b/helloworld/BUILD index 074f433..4329962 100644 --- a/helloworld/BUILD +++ b/helloworld/BUILD @@ -7,14 +7,6 @@ pex_binary( entry_point="helloworld.main", ) -# Note: Has sdist dependencies, so must be built on Linux. -python_awslambda( - name="helloworld-awslambda", - sources=["awslambda.py"], - handler="helloworld.awslambda:handler", - runtime="python3.7", -) - pex_binary( name="helloworld_py2", sources=["main_py2.py"], @@ -22,6 +14,19 @@ pex_binary( interpreter_constraints=["==2.7.*"], ) +python_library( + name="awslambda_lib", + sources=["awslambda.py"], +) + +# Note: This has sdist dependencies, so it must be built on Linux. +python_awslambda( + name="helloworld-awslambda", + dependencies=[":awslambda_lib"], + handler="helloworld.awslambda:handler", + runtime="python3.7", +) + python_library( name="config", sources=["config.py"],