Commit 92a375b8 authored by Hilal Ozdemir's avatar Hilal Ozdemir

update dev.sh to use setuptools

parent 2534b33a
......@@ -29,28 +29,12 @@ 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 beiran
${PYTHON_BINARY} setup.py install
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
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 +59,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/
......
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