From fbf168b3b4c208f62a6a19cbe67067881fddf3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Perdiguero=20L=C3=B3pez?= Date: Wed, 4 Sep 2024 11:33:08 +0200 Subject: [PATCH] :bug: Move templates building into CI --- build.py | 12 ------------ pyproject.toml | 4 ---- scripts/publish | 2 ++ 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 build.py diff --git a/build.py b/build.py deleted file mode 100644 index 9e823d77..00000000 --- a/build.py +++ /dev/null @@ -1,12 +0,0 @@ -import subprocess - - -def build(): - print("🔥 Install js requirements...") - subprocess.run(["npm", "install"], cwd="templates") - print("🔥 Build templates...") - subprocess.run(["npm", "run", "build"], cwd="templates") - - -if __name__ == "__main__": - build() diff --git a/pyproject.toml b/pyproject.toml index 7a382ab5..a81f2a1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,10 +31,6 @@ classifiers = [ include = ["flama/py.typed", "flama/templates/**/*"] exclude = [] -[tool.poetry.build] -generate-setup-file = false -script = "build.py" - [tool.poetry.dependencies] python = ">=3.8,<3.13" starlette = ">=0.31.0,<1.0.0" diff --git a/scripts/publish b/scripts/publish index 25486fd3..1c2ba0d6 100755 --- a/scripts/publish +++ b/scripts/publish @@ -4,6 +4,7 @@ set -e source scripts/str_lib.sh source scripts/clean source scripts/build +source scripts/install publish_pkg() { if [[ -n "${PYPI_TOKEN}" ]]; then @@ -18,6 +19,7 @@ publish_pkg() { local arg="$1" if [ "$arg" == "--build" ]; then clean_folder + install_pkg build_pkg fi