deepdiff
                                
                                
                                
                                    deepdiff copied to clipboard
                            
                            
                            
                        aws sam tool fails when
Describe the bug Hi, I'm not experienced with python packaging so apologies in advance if I've missed the mark here.
We're using deepdiff in a lambda that we're building with the aws sam tool. currently the sam build command will fail anytime we're including deepdiff in the requirements.txt that sam uses to pull and package the lambda deps. an exception is raised in the code here:
https://github.com/aws/aws-lambda-builders/blob/develop/aws_lambda_builders/workflows/python_pip/packager.py#L546
seemingly because the egg-info directory is empty, so we get an indexing error for info_contents[0].
there is a known workaround by using the --use-container flag for sam build but for various reasons we can't easily do that in our workflow.
I know this is not really your problem so much but could this possibly be solved so that deepdiff is made to be compatible with the format that sam expects somehow?
thanks for the good work and again sorry if this is silly request
To Reproduce
sam init to setup hello-world project
include deepdiff in requirements.txt
sam build
Expected behavior
sam build succeeds in bundling deepdiff to the lambda package
OS, DeepDiff version and Python version (please complete the following information):
- OS: Fedora 33 (Workstation Edition) x86_64
 - Version: python 3.8
 
Hi @oscar-bardrick-h24 Thanks for reporting the issue. I have not used SAM before. Is this the same issue? https://github.com/aws/aws-lambda-builders/issues/114
Lol I just saw your comment on the same ticket.
I'm not sure what exactly needs to change on our build. Maybe we wait to see if that ticket on aws-lambda-builders is addressed? I'm not sure when I will have a chance to fix it on our part since I don't use SAM.
Thanks for the quick response. No problem. To be honest yday I managed to find a workaround to the fact that we can't use the --use-container flag for sam build so this is no longer personally an issue for me. We've managed to build our lambda with deepdiff using sam with some circleci magic. Nonetheless I hope it's at least marginally helpful to you guys to know this issue exists. I guess it'll just be solved on the aws side eventually. Thanks again for all the work you've done which we rely upon, much appreciated