-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathreinstall.sh
executable file
·32 lines (29 loc) · 1.11 KB
/
reinstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
#
# This file is aimed for reCompile and reInstall PyGeoC for debugging on Linux/Unix platform.
#
# PyGeoC is distributed for Research and/or Education only,
# any commercial purpose will be FORBIDDEN.
# PyGeoC is an open-source project,
# 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.
#
# This script accepts one optional argument, i.e., the executable of python
# Set default executable of python
pythonexec=${1:-python}
cd "$PWD" || exit
rm -r dist
rm -r build
$pythonexec -m pip install tox
$pythonexec -m pip install wheel
$pythonexec setup.py bdist_wheel
cd dist || { echo "Cannot find dist directory! Reinstall PyGeoC failed!"; exit 1; }
if $pythonexec -c "import pygeoc" &> /dev/null; then
echo 'PyGeoC has been installed, and will be uninstalled first.'
$pythonexec -m pip install PyGeoC
else
echo 'PyGeoC will be firstly installed.'
fi
for i in $(find . -name '*.whl'); do $pythonexec -m pip install "$i" --upgrade --force-reinstall; done