Skip to content

Commit e1b18c1

Browse files
committed
fix requirements
1 parent 38fe780 commit e1b18c1

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ black>=22.3.0
22
faasmctl>=0.32.0
33
flake8>=4.0.1
44
invoke>=1.7.1
5+
python-lsp-server[all]>=1.12.0
56
PyYAML>=6.0.1

tasks/jwt.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from os.path import exists, join
55
from shutil import copy, rmtree
66
from subprocess import run
7-
from tasks.env import EXAMPLES_DIR
7+
from tasks.env import EXAMPLES_DIR, in_docker
88

99

1010
@task(default=True)
@@ -27,7 +27,11 @@ def build(ctx, clean=False, native=False):
2727
lib_dir = "/usr/local/lib/tless-jwt"
2828
header_dir = "/usr/include/tless-jwt"
2929
src_lib = join(
30-
jwt_dir, "target", "wasm32-wasip1" if not native else "", "release", "libtless_jwt.a"
30+
jwt_dir,
31+
"target",
32+
"wasm32-wasip1" if not native else "",
33+
"release",
34+
"libtless_jwt.a",
3135
)
3236
if native:
3337
if not exists(lib_dir):
@@ -43,15 +47,19 @@ def build(ctx, clean=False, native=False):
4347
dst_lib = join(lib_dir, "libtless_jwt.a")
4448
else:
4549
build_env = get_faasm_build_env_dict()
46-
dst_lib = join(build_env["FAASM_WASM_LIB_INSTALL_DIR"], "libtless-jwt.a")
50+
dst_lib = join(
51+
build_env["FAASM_WASM_LIB_INSTALL_DIR"], "libtless-jwt.a"
52+
)
4753
if in_docker():
4854
copy(src_lib, dst_lib)
4955
else:
5056
run(f"sudo cp {src_lib} {dst_lib}", shell=True, check=True)
5157

5258
# Build the CPP bindings library, and cross-compile it to WASM
5359
tles_jwt_cpp_dir = join(jwt_dir, "cpp-bindings")
54-
build_dir = join(tles_jwt_cpp_dir, "build-native" if native else "build-wasm")
60+
build_dir = join(
61+
tles_jwt_cpp_dir, "build-native" if native else "build-wasm"
62+
)
5563

5664
if clean and exists(build_dir):
5765
rmtree(build_dir)
@@ -62,7 +70,11 @@ def build(ctx, clean=False, native=False):
6270
"cmake",
6371
"-GNinja",
6472
"-DCMAKE_BUILD_TYPE=Release",
65-
"-DCMAKE_TOOLCHAIN_FILE={}".format(CMAKE_TOOLCHAIN_FILE) if not native else "",
73+
(
74+
"-DCMAKE_TOOLCHAIN_FILE={}".format(CMAKE_TOOLCHAIN_FILE)
75+
if not native
76+
else ""
77+
),
6678
tles_jwt_cpp_dir,
6779
]
6880
cmake_cmd = " ".join(cmake_cmd)
@@ -89,7 +101,7 @@ def build(ctx, clean=False, native=False):
89101

90102
# Install the header too
91103
src_header = join(tles_jwt_cpp_dir, "tless_jwt.h")
92-
if not native
104+
if not native:
93105
dst_header = join(
94106
build_env["FAASM_WASM_HEADER_INSTALL_DIR"], "tless_jwt.h"
95107
)

0 commit comments

Comments
 (0)