Skip to content

Commit

Permalink
✨(project) re-install local libs for development
Browse files Browse the repository at this point in the history
Installing OpenEdx local libraries as eggs requires modifying OpenEdx
sources (e.g. to create an egg info directory for each library). Hence,
for development as the sources are mounted as a volume, we need to
ensure that python will find related modules by reinstalling them in
the development's virtualenv.

Concerning the front-end, we also need to install specific node modules
once installed (e.g. edx-ui-toolkit) at least for the eucalyptus
release.
  • Loading branch information
jmaupetit committed Nov 6, 2019
1 parent 9daaf4e commit 4134f04
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ dev: ## start the cms and lms services (development image and servers)
# everytime you update edx-platform sources and plan to develop in it.
dev-assets: \
tree \
create-symlinks
create-symlinks \
dev-install \
dev-ui-toolkit
dev-assets: ## run update_assets to copy required statics in local volumes
$(COMPOSE_RUN) --no-deps lms-dev \
paver update_assets --settings=fun.docker_build_development --skip-collect
Expand All @@ -189,6 +191,29 @@ dev-build: ## build the edxapp production image
$(COMPOSE) build lms-dev
.PHONY: dev-build

# In development, we are mounting edx-platform's sources as a volume, hence,
# since sources are modified during the installation, we need to re-install
# them.
dev-install: \
$(FLAVORED_EDX_RELEASE_PATH)/src/edx-platform/requirements/edx/local.txt
dev-install: ## re-install local libs in mounted sources
$(COMPOSE_RUN) --no-deps lms-dev \
pip install -r requirements/edx/local.txt
$(COMPOSE_RUN) --no-deps lms-dev \
npm install
.PHONY: dev-install

# FIXME
#
# Target release: eucalyptus.3
#
# This package should be manually installed from node_modules 🤮
dev-ui-toolkit: \
$(FLAVORED_EDX_RELEASE_PATH)/src/edx-platform/node_modules/edx-ui-toolkit/package.json
$(COMPOSE_RUN) --no-deps lms-dev \
bash -c "cd node_modules/edx-ui-toolkit && npm install"
.PHONY: dev-ui-toolkit

dev-watch: tree ## start assets watcher (front-end development)
$(COMPOSE_EXEC) lms-dev \
paver watch_assets --settings=fun.docker_build_development
Expand Down

0 comments on commit 4134f04

Please sign in to comment.