Commit f37ceb86 authored by Hilal Ozdemir's avatar Hilal Ozdemir

Merge branch '314-make-beiran-docker-plugin-a-separate-package' into...

Merge branch '314-make-beiran-docker-plugin-a-separate-package' into 315-make-beiran-k8s-plugin-a-separate-package
parents 76b2ca03 99d326e2
......@@ -29,28 +29,16 @@ else
export PIP=$(which pip3 || which pip || echo 'pip')
fi
STAMP=$(date +%s)
INSTALLED=0
LAST_INSTALL=$(date -r ${VIRTUAL_ENV_DIR}/.last_install +%s 2>/dev/null || echo "0")
packages="beiran plugins/*"
for package in $packages; do
package_name=$(basename $package)
if [ ! -h ${PKG_DIR}/$package_name ]; then
ln -s ${DIR}/$package ${PKG_DIR}/
fi
#install prerequisite package `yajl`
apt-get install libyajl2
apt-get install libyajl-dev
if [ -f $package/requirements.txt ]; then
REQ_MODIFIED=$(date -r $package/requirements.txt +%s)
if [ $REQ_MODIFIED -gt $LAST_INSTALL ]; then
$PIP install -r $package/requirements.txt
INSTALLED=1
fi
fi
done
# install beiran
${PYTHON_BINARY} setup.py install
if [ $INSTALLED -eq 1 ]; then
echo $STAMP > ${VIRTUAL_ENV_DIR}/.last_install
fi
# install beiran_package_docker
cd ${DIR}/plugins/beiran_package_docker
${PYTHON_BINARY} setup.py install
cat > ${VIRTUAL_ENV_DIR}/bin/beiran <<EOF
#!/bin/sh -e
......@@ -75,6 +63,8 @@ export BEIRAN_URL=http://localhost:${BEIRAN_PORT}
export BEIRAN_DB_FILE=${DIR}/beiran.db
export BEIRAN_LISTEN_ADDRESS=0.0.0.0
export BEIRAN_CONFIG_DIR=${DIR}
export BEIRAN_DISCOVERY_METHOD=zeroconf
export BEIRAN_PLUGINS=beiran.plugins.discovery.zeroconf,package.docker
# make binary of 'tar-split' with Docker
tarsplit_dir=${DIR}/plugins/beiran_package_docker/
......
......@@ -56,10 +56,8 @@ ignore_missing_imports = True
ignore_errors = True
# disable import errors such as from plugins.beiran_package_docker.models import DockerImage
[mypy-plugins.*]
[mypy-beiran_package_docker.*]
ignore_missing_imports = True
[mypy-click.*]
ignore_missing_imports = True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment