File tree 6 files changed +19
-6
lines changed
6 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 1
1
__pycache__
2
2
* .key
3
3
.coverage
4
+ lib
Original file line number Diff line number Diff line change 7
7
"dev:default" : " ./run-docker.sh" ,
8
8
"test" : " pytest" ,
9
9
"lint" : " flake8 src tests && mypy src tests" ,
10
+ "build" : " mkdir -p lib && pip install --target lib -r requirements.txt" ,
10
11
"format:write" : " black src tests" ,
11
12
"format:check" : " black --check src tests"
12
13
},
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : [" //" ],
3
+ "pipeline" : {
4
+ "build" : {
5
+ "inputs" : [" requirements.txt" ],
6
+ "outputs" : [" lib/**" ]
7
+ }
8
+ }
9
+ }
Original file line number Diff line number Diff line change 1
1
# Copy API files from apps/api
2
- cp -R ../api/{requirements.txt, configuration} .
2
+ cp -R ../api/configuration .
3
3
cp -R ../api/src/ src/api/
4
4
cp ../api/index.py api/index.py
5
+
6
+ # Copy Python libraries installed by during turbo build in apps/api
7
+ # instead of having Vercel install using requirements.txt
8
+ cp -R ../api/lib/* .
Original file line number Diff line number Diff line change 1
1
{
2
- "buildCommand" : " cd ../.. && turbo run build --filter={apps/site} && cd apps/site && ./copy-api.sh && ./vercel-lib .sh" ,
2
+ "buildCommand" : " ./vercel-lib.sh && cd ../.. && turbo run build --filter={apps/site} --filter={apps/api} && cd apps/site && ./copy-api.sh" ,
3
3
"functions" : {
4
4
"api/index.py" : {
5
5
"memory" : 512 ,
Original file line number Diff line number Diff line change @@ -21,12 +21,10 @@ lib_files=(
21
21
libgpg-error.so.0.10.0
22
22
)
23
23
24
+ # These system libraries will be included in the Lambda deployment files
25
+ # and accessible from Python through LD_LIBRARY_PATH
24
26
mkdir lib
25
27
for file in " ${lib_files[@]} "
26
28
do
27
29
cp /usr/lib64/$file lib/
28
30
done
29
-
30
- echo $PWD
31
- ls
32
- ls lib
You can’t perform that action at this time.
0 commit comments