make_package.sh 1.19 KB
Newer Older
1
#!/usr/bin/env bash
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Copyright (C) 2015 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

cd "$(dirname "$0")"
18
ROOTPATH=$(pwd)
19 20

ID=agkyra-$(date +%s)
21
BUILDDIR=$ROOTPATH/build/$ID
22
echo building under $BUILDDIR
23
DISTDIR=$ROOTPATH/dist
24
TMPAGKYRA=$BUILDDIR/agkyra
25
mkdir -p $TMPAGKYRA
26
WHEELHOUSE=$TMPAGKYRA/wheelhouse
27

28 29 30
pip wheel . -w $WHEELHOUSE
if [ $? -ne 0 ]; then
    exit 1
31 32
fi

33 34 35 36 37
cd $WHEELHOUSE
for i in *; do unzip $i -d $TMPAGKYRA/lib; done
cd $TMPAGKYRA
rm -r $WHEELHOUSE

38
cp $ROOTPATH/agkyra/scripts/agkyra $TMPAGKYRA/agkyra
39 40
rm -rf $DISTDIR/agkyra
mkdir -p $DISTDIR
41 42
mv $TMPAGKYRA $DISTDIR
echo built in $DISTDIR/agkyra