Skip to content

Commit 51aeebc

Browse files
committed
Solve bug "make install fails with error #3"
1 parent 12c484e commit 51aeebc

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,5 @@ sonarqube/logs
138138

139139
.terraform
140140

141-
my_app
141+
my_app
142+
backend2

create_fastapi_project/templates/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@ def install_template(root: str, template: ITemplate, app_name: str):
3737
dirs_exist_ok=True,
3838
)
3939

40-
poetry_path = ""
41-
if template == ITemplate.full or template == ITemplate.langchain_basic:
40+
poetry_path = os.path.join(root, "backend", "app")
41+
if template == ITemplate.langchain_basic:
4242
# TODO: CHECK PATHS IN MACOS AND WINDOWS | (os.path.join)
4343
poetry_frontend_path = os.path.join(root, "frontend", "app")
44-
45-
else:
46-
poetry_path = os.path.join(root, "backend", "app")
47-
44+
4845
has_pyproject = add_configuration_to_pyproject(poetry_path)
4946

5047
if has_pyproject:
@@ -114,6 +111,8 @@ def install_template(root: str, template: ITemplate, app_name: str):
114111
dev_dependencies.extend(full_dev_dependencies)
115112

116113
print("- Installing main packages. This might take a couple of minutes.")
114+
print("poetry_path", poetry_path)
115+
print("template", template)
117116
install_dependencies(poetry_path, dependencies)
118117
print("- Installing development packages. This might take a couple of minutes.")
119118
install_dependencies(poetry_path, dev_dependencies, dev=True)

create_fastapi_project/templates/basic/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ help:
3030
@echo " Lint code with ruff and try to fix."
3131

3232
install:
33-
cd backend/app && poetry install && cd ..
33+
cd backend/app && poetry install && cd ../..
3434

3535
run-app:
3636
cd backend/app && poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 && cd ..

create_fastapi_project/templates/full/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ help:
6060
@echo " Stops Sonarqube container."
6161

6262
install:
63-
cd backend/app && \
64-
poetry shell && \
65-
poetry install
63+
cd backend/app && poetry install && cd ../..
6664

6765
run-dev-build:
6866
docker compose -f docker-compose-dev.yml up --build

create_fastapi_project/templates/full/backend/app/README.md

Whitespace-only changes.

create_fastapi_project/templates/langchain_basic/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ help:
3030
@echo " Lint code with ruff and try to fix."
3131

3232
install:
33-
cd app && poetry install && cd ..
33+
cd backend/app && poetry install && cd ../..
3434

3535
run-app:
36-
cd app && poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 && cd ..
36+
cd backend/app && poetry run uvicorn app.main:app --host 0.0.0.0 --port 8000 && cd ..
3737

3838

3939
run-dev-build:

0 commit comments

Comments
 (0)