From 4d64fe3a76764ce4ea8a27627e0342bf875778b2 Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Wed, 8 Apr 2026 12:48:09 -0400 Subject: [PATCH 1/5] hopefully fix pip install for package --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 374b58cbf..8d26c3cfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,6 @@ requires = [ "wheel" ] build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["appstore"] \ No newline at end of file From 07ca5e7a15c1c0699a66a9da175f51dcf6182fca Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Wed, 8 Apr 2026 12:49:37 -0400 Subject: [PATCH 2/5] try setup.py change --- pyproject.toml | 3 --- setup.py | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8d26c3cfd..374b58cbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,3 @@ requires = [ "wheel" ] build-backend = "setuptools.build_meta" - -[tool.setuptools] -packages = ["appstore"] \ No newline at end of file diff --git a/setup.py b/setup.py index 45f160da6..283300a73 100644 --- a/setup.py +++ b/setup.py @@ -3,4 +3,7 @@ import setuptools if __name__ == "__main__": - setuptools.setup() \ No newline at end of file + setuptools.setup( + name="appstore", + packages=["appstore"], + ) \ No newline at end of file From 959011b1f3d4da6df1d9496bdccfe7a0d6761304 Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Wed, 8 Apr 2026 13:05:10 -0400 Subject: [PATCH 3/5] Add requirements install to setup.py, ensure appstore gets picked up as a package by setuptools --- appstore/__init__.py | 0 setup.py | 19 ++++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 appstore/__init__.py diff --git a/appstore/__init__.py b/appstore/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/setup.py b/setup.py index 283300a73..cd50c6229 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,17 @@ import setuptools -if __name__ == "__main__": - setuptools.setup( - name="appstore", - packages=["appstore"], - ) \ No newline at end of file +def parse_requirements(filename): + with open(filename, "r") as f: + return [ + line.strip() + for line in f + if line.strip() and not line.startswith("#") + ] + +setuptools.setup( + name="appstore", + packages=setuptools.find_packages(), + include_package_data=True, + install_requires=parse_requirements("requirements.txt"), +) \ No newline at end of file From 3f3355e743856d3107a2ec3f2989f0dbf0dfec7d Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Wed, 8 Apr 2026 13:30:31 -0400 Subject: [PATCH 4/5] make sure tycho yaml gets included to avoid error --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index ec283a7d9..9a509ef35 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ recursive-include appstore/templates * +recursive-include appstore/tycho * recursive-include appstore/appstore/static * recursive-include appstore/appstore/templates * recursive-include appstore/core/static * From 7c9a4a32ec84bc8342bea91b89c4e385002b4202 Mon Sep 17 00:00:00 2001 From: frostyfan109 Date: Thu, 16 Apr 2026 11:43:52 -0400 Subject: [PATCH 5/5] some makefile changes to support replicas --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 42a2f4266..23c47377b 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ DOCKER_OWNER := helxplatform DOCKER_APP := appstore DOCKER_TAG := ${VERSION} DOCKER_IMAGE := ${DOCKER_OWNER}/${DOCKER_APP}:$(DOCKER_TAG) -SECRET_KEY := $(shell openssl rand -base64 12) +SECRET_KEY ?= $(shell openssl rand -base64 12) APP_LIST ?= api appstore core frontend middleware product BRANDS := braini bdc heal restartr scidas eduhelx argus tracs eduhelx-sandbox eduhelx-dev eduhelx-dev-student eduhelx-dev-professor eduhelx-student eduhelx-professor MANAGE := ${PYTHON} appstore/manage.py @@ -93,8 +93,8 @@ install: test: $(foreach brand,$(BRANDS),SECRET_KEY=${SECRET_KEY} DEV_PHASE=stub DJANGO_SETTINGS_MODULE=appstore.settings.$(brand)_settings ${MANAGE} test $(APP_LIST);) -#start: Run the gunicorn server -start: build.postgresql.local +#db-init: Run migrations and seed data (run once per deploy, not per replica) +db-init: build.postgresql.local if [ -z ${DJANGO_SETTINGS_MODULE} ]; then make help && echo "\n\nPlease set the DJANGO_SETTINGS_MODULE environment variable\n\n"; exit 1; fi ${MANAGE} makemigrations ${MANAGE} migrate @@ -104,6 +104,11 @@ start: build.postgresql.local if [ "${CREATE_TEST_USERS}" = "true" ]; then ${MANAGE} shell < bin/createtestusers.py; fi ${MANAGE} collectstatic --clear --no-input ${MANAGE} spectacular --file ./appstore/schema.yml + +#start: Run the gunicorn server +start: build.postgresql.local + if [ -z ${DJANGO_SETTINGS_MODULE} ]; then make help && echo "\n\nPlease set the DJANGO_SETTINGS_MODULE environment variable\n\n"; exit 1; fi + ${MANAGE} collectstatic --clear --no-input gunicorn --bind 0.0.0.0:8000 --log-level=${LOG_LEVEL} --pythonpath=./appstore appstore.wsgi:application --workers=${NO_OF_GUNICORN_WORKERS} #build: Build the Docker image