Skip to content

Commit

Permalink
Hack for cython/pyyaml issue
Browse files Browse the repository at this point in the history
Fighting upstream issues:

 yaml/pyyaml#724
 yaml/pyyaml#601

Signed-off-by: Andy Doan <andy@foundries.io>
  • Loading branch information
doanac committed Jul 18, 2023
1 parent eff33da commit fb87140
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN mkdir -p $APPDIR
COPY ./requirements.txt /srv/jobserv/

RUN apk --no-cache add python3 py3-pip mysql-client python3-dev musl-dev g++ openssl libffi-dev openssl-dev rust cargo linux-headers && \
# This is a temp hack due to: https://github.com/yaml/pyyaml/issues/601
pip3 install --no-build-isolation 'cython<3.0.0' 'PyYAML==5.4.1' && \
pip3 install --upgrade pip setuptools && \
pip3 install -r $APPDIR/requirements.txt && \
apk del python3-dev musl-dev g++ libffi-dev openssl-dev rust cargo linux-headers
Expand Down
5 changes: 5 additions & 0 deletions unit-test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -ex
set -ex

HERE=$(dirname $(readlink -f $0))
cd $HERE
Expand All @@ -17,7 +18,11 @@ if [ -z $SQLALCHEMY_DATABASE_URI ] ; then
export SQLALCHEMY_DATABASE_URI='sqlite://'
fi

# This is a temp hack due to: https://github.com/yaml/pyyaml/issues/601
# and you have to do it globally *and* in the venv below to make it work
pip3 install --no-build-isolation 'cython<3.0.0' 'PyYAML==5.4.1'
python3 -m venv $VENV
$VENV/bin/pip3 install --no-build-isolation 'cython<3.0.0' 'PyYAML==5.4.1'
$VENV/bin/pip3 install -U pip
$VENV/bin/pip3 install -U setuptools
$VENV/bin/pip3 install -r requirements.txt
Expand Down

0 comments on commit fb87140

Please sign in to comment.