From 0a748763535dd184926969cfdc3d439a1b8bc9e9 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Wed, 21 Aug 2024 00:01:02 +0200 Subject: updated create_venv.sh to use pip --- create_venv.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'create_venv.sh') diff --git a/create_venv.sh b/create_venv.sh index c9a5507..5432f47 100755 --- a/create_venv.sh +++ b/create_venv.sh @@ -1,13 +1,23 @@ #!/bin/bash -eu +SCRIPT_ROOT=$(pwd) +SDK_DIR_NAME=spacetraders-sdk + wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.7.0/openapi-generator-cli-7.7.0.jar -O openapi-generator-cli.jar -java -jar openapi-generator-cli.jar generate -g python -v -i "https://stoplight.io/api/v1/projects/spacetraders/spacetraders/nodes/reference/SpaceTraders.json?fromExportButton=true&snapshotType=http_service&deref=optimizedBundle" -o spacetraders-sdk +java -jar openapi-generator-cli.jar generate -g python -v -i "https://stoplight.io/api/v1/projects/spacetraders/spacetraders/nodes/reference/SpaceTraders.json?fromExportButton=true&snapshotType=http_service&deref=optimizedBundle" -o $SDK_DIR_NAME rm openapi-generator-cli.jar python3 -m venv venv + +for dir in $SCRIPT_ROOT/venv/lib/*; do + if [ -d $dir ]; then + ln -sf ../../../../$SDK_DIR_NAME/openapi_client $dir/site-packages/openapi_client + fi +done + source venv/bin/activate +cd $SDK_DIR_NAME -cd spacetraders-sdk -python3 setup.py install +pip install -r requirements.txt -- cgit v1.2.3-70-g09d2