File tree Expand file tree Collapse file tree 2 files changed +28
-16
lines changed
test/python/stackql_test_tooling Expand file tree Collapse file tree 2 files changed +28
-16
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- poetryExe=" $( which poetry) "
4- rv=" $? "
5- if [ $rv -ne 0 ]; then
6- >&2 echo " Poetry is not installed. Please install it first."
7- exit 1
8- fi
9- if [ " $poetryExe " = " " ]; then
10- >&2 echo " No poetry executable found in PATH. Please install it first."
11- exit 1
12- fi
3+ checkPoetry () {
4+ if ! command -v poetry & > /dev/null
5+ then
6+ >&2 echo " Poetry is not installed. Please install it first."
7+ exit 1
8+ fi
9+ }
1310
1411CURDIR=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
1512
1613REPOSITORY_ROOT=" $( realpath ${CURDIR} /../..) "
1714
1815PACKAGE_ROOT=" ${REPOSITORY_ROOT} /test"
1916
20- venv_path=" ${REPOSITORY_ROOT} /.venv"
21-
22-
2317rm -f ${PACKAGE_ROOT} /dist/* .whl || true
2418
19+ if [ ! -d " ${PACKAGE_ROOT} /.venv" ]; then
20+ >&2 echo " No existing virtual environment, creating one..."
21+ >&2 echo " Creating virtual environment in ${PACKAGE_ROOT} /.venv"
22+ python -m venv " ${PACKAGE_ROOT} /.venv"
23+ >&2 echo " Virtual environment created."
24+ >&2 echo " Installing poetry into virtual environment."
25+ ${PACKAGE_ROOT} /.venv/bin/pip install -U pip setuptools
26+ ${PACKAGE_ROOT} /.venv/bin/pip install poetry
27+ >&2 echo " Poetry installed into virtual environment."
28+ else
29+ >&2 echo " Using existing virtual environment in ${PACKAGE_ROOT} /.venv"
30+ fi
31+
2532cd " ${PACKAGE_ROOT} "
2633
34+ source ${PACKAGE_ROOT} /.venv/bin/activate
35+
36+ checkPoetry
37+
2738poetry install
2839
2940poetry build
3849fi
3950
4051
41- # >&2 echo "Artifact built successfully: ${expectedRobotLibArtifact}"
4252
4353
4454
Original file line number Diff line number Diff line change 66
77import os
88
9+ from pathlib import Path , PurePosixPath
10+
911from typing import Optional
1012
1113@library
1214class web_service_keywords (Process ):
1315
16+ _THIS_DIR : str = PurePosixPath (Path (os .path .dirname (os .path .abspath (__file__ )))).as_posix ()
1417
15-
16- _DEFAULT_APP_ROOT : str = 'test/python/stackql_test_tooling/flask'
18+ _DEFAULT_APP_ROOT : str = os .path .join (_THIS_DIR , 'flask' )
1719
1820 _DEFAULT_TLS_KEY_PATH : str = 'test/server/mtls/credentials/pg_server_key.pem'
1921
You can’t perform that action at this time.
0 commit comments