Skip to content

Commit

Permalink
Add missing file in 2.9 setup files and
Browse files Browse the repository at this point in the history
And upgrade pytest-rerunfailures

To avoid error:

  File "/usr/lib/python3.9/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py", line 53, in pytest_addoption
    add_ini_option("string")
  File "/usr/lib/python3.9/site-packages/setuptools/_vendor/typeguard/_pytest_plugin.py", line 22, in add_ini_option
    parser.addini(
  File "/usr/lib/python3.9/site-packages/_pytest/config/argparsing.py", line 131, in addini
    assert type in (None, "pathlist", "args", "linelist", "bool")
AssertionError
  • Loading branch information
amercader committed Nov 19, 2024
1 parent 04fd45e commit cfe436d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan-2.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ RUN apk add --no-cache libffi-dev
# Install CKAN dev requirements
RUN pip3 install -r https://raw.githubusercontent.com/ckan/ckan/${CKAN_REF}/dev-requirements.txt

# TODO: remove if requirements upgraded upstream
RUN pip3 install -U pytest-rerunfailures

# Create folder for local extensions sources
RUN mkdir -p ${SRC_EXTENSIONS_DIR}

Expand Down
58 changes: 58 additions & 0 deletions ckan-2.9/setup/install_src.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

if [ $(id -u) -ne 0 ]; then
echo "Please run as root"
exit 1
fi

# Install any local extensions in the src_extensions volume
echo "Looking for local extensions to install..."
echo "Extension dir contents:"
ls -la $SRC_EXTENSIONS_DIR
for i in $SRC_EXTENSIONS_DIR/*
do
if [ -d $i ];
then
if [ -d $SRC_DIR/$(basename $i) ];
then
pip uninstall -y "$(basename $i)"
fi

if [ -f $i/pip-requirements.txt ];
then
pip install -r $i/pip-requirements.txt
echo "Found requirements file in $i"
fi
if [ -f $i/requirements.txt ];
then
pip install -r $i/requirements.txt
echo "Found requirements file in $i"
fi
if [ -f $i/dev-requirements.txt ];
then
pip install -r $i/dev-requirements.txt
echo "Found dev-requirements file in $i"
fi
if [ -f $i/setup.py ];
then
cd $i
python3 $i/setup.py develop
echo "Found setup.py file in $i"
cd $APP_DIR
fi
if [ -f $i/pyproject.toml ];
then
cd $i
pip install -e .
echo "Found pyproject.toml file in $i"
cd $APP_DIR
fi

# Point `use` in test.ini to location of `test-core.ini`
if [ -f $i/test.ini ];
then
echo "Updating \`test.ini\` reference to \`test-core.ini\` for plugin $i"
ckan config-tool $i/test.ini "use = config:../../src/ckan/test-core.ini"
fi
fi
done

0 comments on commit cfe436d

Please sign in to comment.