Custom Python dependencies
How to install custom Python dependencies
When running meya push --build-image
our build system will automatically run a file called install.sh
which can be used to run scripts including installing custom Python dependencies using pip
.
Example install.sh
script:
#!/bin/sh
set -e
echo "Installing custom requirements"
apk add --no-cache --virtual .build-deps \
gcc \
python3-dev \
&& pip install --disable-pip-version-check --no-cache-dir -r requirements.txt \
&& apk del .build-deps
This script will install any Python dependencies in a file located at your app root ./requirements.txt
.
Make sure you run pip install -r requirements.txt
locally so that the meya code validation will pass before pushing the code.
pip install -r requirements.txt
Example requirements.txt
:
ShopifyAPI==8.02
stripe==2.51.0
Updated over 2 years ago