File: test_install.sh

package info (click to toggle)
python-cykhash 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,240 kB
  • sloc: python: 3,954; sh: 90; makefile: 7
file content (43 lines) | stat: -rw-r--r-- 911 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
set -e

ENV_DIR="../p3"
virtualenv -p python3 "$ENV_DIR"
echo "Testing python3"


#activate environment
. "$ENV_DIR/bin/activate"

python -c "import setuptools; print('setuptools version:', setuptools.__version__)"

# test installation in clean environment
if [ "$1" = "from-github" ]; then
    pip install https://github.com/realead/cykhash/zipball/master
elif [ "$1" = "from-test-pypi" ]; then
    pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple cykhash
elif [ "$1" = "from-pypi" ]; then
    pip install cykhash
else
      (cd .. && python -m pip install .)
#     (cd .. && python setup.py build install)
fi;

# needed for testing:
pip install numpy
pip install cython
pip install pytest

pip freeze

sh run_unit_tests.sh
sh run_doctests.sh



#clean or keep the environment
if [ "$2" = "keep" ]; then
   echo "keeping enviroment $ENV_DIR"
else
   rm -r "$ENV_DIR"
fi;