lively-dusk-42400
11/20/2023, 1:02 AMboto3 and I want to exclude botocore which is used by boto3
When I list my dependencies (--transitive flag is on), I only see boto3 so can't specify a correct target to exclude botocorebroad-processor-92400
11/20/2023, 1:09 AMlively-dusk-42400
11/20/2023, 1:58 AMnumpy dependency which I want to exclude and use it as separate layerbroad-processor-92400
11/20/2023, 2:01 AMbroad-processor-92400
11/20/2023, 2:03 AMpants dependencies --transitive not working well for transitive dependencies of PyPI packages.)lively-dusk-42400
11/20/2023, 2:11 AMnumpy itself. My lambda and layers are getting deployed but lambda fails to run with this error:
Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.
I'm aware of [python.resolves_to_only_binary] but it's packaging it the same way and the problem remains
I'm using pants version 2.18.0a0 and python_aws_lambda_layer to build this layerlively-dusk-42400
11/20/2023, 2:12 AMbroad-processor-92400
11/20/2023, 2:13 AMpants.toml file and definition of the target you're building?broad-processor-92400
11/20/2023, 2:13 AM2.18.0 and see if that resolves the error, in case this is a problem we already fixed?lively-dusk-42400
11/20/2023, 2:14 AM[GLOBAL]
pants_version = "2.18.0a0"
pants_distdir = ""
backend_packages = [
"pants.backend.awslambda.python",
"pants.backend.python"
]
[python]
interpreter_constraints = ["CPython==3.9.*"]
enable_resolves = true
[python.resolves_to_only_binary]
python-default = ["numpy"]
__default__ = ["numpy"]
python_requirements(name="reqs")
python_aws_lambda_layer(
name="layer",
dependencies=[":reqs"],
include_sources=False,
complete_platforms=["3rdparty/platforms:macos_python_3_9"],
output_path="layers/yfinance/layer.zip"
)broad-processor-92400
11/20/2023, 2:16 AM3rdparty/platforms:macos_python_3_9 makes me suspicious: Lambda runs on Linux, so a complete platform file for macOS is a bit unexpected.
Pants 2.18.0 comes with its own complete platforms (for lambdas); does it work if you remove that field?lively-dusk-42400
11/20/2023, 2:19 AMSuccessfully built the wheel peewee-3.17.0-cp39-cp39-macosx_11_0_arm64.whl from the sdist peewee-3.17.0.tar.gz but it is not compatible with the requested foreign target complete platform cp39-cp39-manylinux_2_26_x86_64.lively-dusk-42400
11/20/2023, 2:20 AM3rdparty/platforms:macos_python_3_9lively-dusk-42400
11/20/2023, 2:22 AMAlso, can you upgrade toThis is a another problem I'm having right now. It's not updating but I was able to update formand see if that resolves the error, in case this is a problem we already fixed?2.18.0
2.17.0 to 2.18.0a0 before. I'm getting this:lively-dusk-42400
11/20/2023, 2:23 AMbroad-processor-92400
11/20/2023, 2:24 AMbroad-processor-92400
11/20/2023, 2:27 AMThis is a another problem I'm having right now. It's not updating but I was able to update formHm, that's very weird.to2.17.0before. I'm getting this:2.18.0a0
broad-processor-92400
11/20/2023, 2:28 AMexport SCIE_BOOT=update pants line isn't doing what you expect. It's setting two environment variables: SCIE_BOOT=update and pants .broad-processor-92400
11/20/2023, 2:29 AMSCIE_BOOT=update pants without the export
⢠To update the pants version (which the launcher coordinates installing and running), edit pants.toml to set pants_versionlively-dusk-42400
11/20/2023, 2:29 AMpeewee, I won't have a problem with numpy missing binaries that I'm having right now? Just don't want to spend time for fixing peewee and eventually facing the same problem?broad-processor-92400
11/20/2023, 2:31 AMnumpy and get that working, and then expand from therelively-dusk-42400
11/20/2023, 2:31 AM[GLOBAL]
pants_version = "2.18.0"broad-processor-92400
11/20/2023, 2:31 AMbroad-processor-92400
11/20/2023, 2:33 AMexport? You might need to unexport SCIE_BOOT, e.g. unset SCIE_BOOT or start a new shell.lively-dusk-42400
11/20/2023, 2:34 AMlively-dusk-42400
11/20/2023, 2:36 AMnumpy dependency