File: test.sh

package info (click to toggle)
gdspy 1.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,020 kB
  • sloc: python: 9,180; cpp: 4,716; sh: 39; makefile: 20
file content (25 lines) | stat: -rwxr-xr-x 526 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
#!/bin/sh

VERSION=$1
if [ "$(command -v "virtualenv$VERSION")" ]; then
  ENV=~/gdspy-env-$VERSION

  [ ! -d "$ENV" ] && "virtualenv$VERSION" --system-site-packages "$ENV"
  [ -d "$ENV/lib/python$VERSION/site-packages/gdspy" ] && rm -r "$ENV/lib/python$VERSION/site-packages/gdspy"

  . "$ENV/bin/activate"

  python setup.py build && python setup.py install

  echo
  echo "Testing $VERSION"
  cd docs/_static || exit
  for i in *.py; do
    python "$i"
  done
  cd - || exit

  deactivate
else
  echo "Usage: $0 version"
fi