From f888a02ed4a5b715557f679571e3bbb8ad9c0f17 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Mon, 19 Aug 2024 13:45:52 +0200 Subject: fixed module installation --- .gitignore | 2 ++ create_venv.sh | 13 +++++++++++++ get_api.sh | 11 ----------- 3 files changed, 15 insertions(+), 11 deletions(-) create mode 100755 create_venv.sh delete mode 100755 get_api.sh diff --git a/.gitignore b/.gitignore index a619feb..3b33b61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ sta.token spacetraders-sdk/ modules/spacetraders +__pycache__/ +venv/ diff --git a/create_venv.sh b/create_venv.sh new file mode 100755 index 0000000..c9a5507 --- /dev/null +++ b/create_venv.sh @@ -0,0 +1,13 @@ +#!/bin/bash -eu + +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 + +rm openapi-generator-cli.jar + +python3 -m venv venv +source venv/bin/activate + +cd spacetraders-sdk +python3 setup.py install diff --git a/get_api.sh b/get_api.sh deleted file mode 100755 index 1d36812..0000000 --- a/get_api.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -eu - -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 - -mkdir -p modules - -ln -sf spacetraders-sdk/openapi_client modules/spacetraders - -rm openapi-generator-cli.jar -- cgit v1.2.3-70-g09d2