Skip to content

Commit

Permalink
Add cython < 3.0 constraint for dev reqs
Browse files Browse the repository at this point in the history
make venv fails on Python 3.11 and greater due to incompatibility between our
pinned PyYAML version and cython 3.0. For now, let's constrain the cython version
to allow it to succeed. In future we should update development requirements.
  • Loading branch information
zenmonkeykstop committed Apr 26, 2024
1 parent 6f7a725 commit 90ea2f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devops/scripts/boot-strap-venv.sh
Expand Up @@ -18,6 +18,7 @@ venv_instructions() {

function virtualenv_bootstrap() {
PYTHON_VERSION="3.8"
DEV_CONSTRAINT="securedrop/requirements/python3/develop-constraints.txt"
VIRTUAL_ENV="${VIRTUAL_ENV:-}" # Just to get around all the "set -u"
if [ -n "$VIRTUAL_ENV" ]
then
Expand Down Expand Up @@ -53,7 +54,7 @@ function virtualenv_bootstrap() {
virtualenv -p "${p}" "${VENV}"
fi

"${VENV}/bin/pip" install -q -r "securedrop/requirements/python3/develop-requirements.txt"
PIP_CONSTRAINT=${DEV_CONSTRAINT} "${VENV}/bin/pip" install -q -r "securedrop/requirements/python3/develop-requirements.txt"

. "${VENV}/bin/activate"
fi
Expand Down
1 change: 1 addition & 0 deletions securedrop/requirements/python3/develop-constraints.txt
@@ -0,0 +1 @@
cython < 3.0

0 comments on commit 90ea2f9

Please sign in to comment.