@@ -8,21 +8,33 @@ usage: ## Show this help
8
8
@fgrep -h " ##" $(MAKEFILE_LIST ) | fgrep -v fgrep | sed -e ' s/\\$$//' | sed -e ' s/##//'
9
9
10
10
install : # # Install npm/pip dependencies, compile code
11
+ make install-pypi
12
+
13
+ install-pypi :
14
+ make setup-venv && make install-libs
15
+ # re-install amazon_kclpy as it needs to re-download JAR files which are otherwise missing in the cached copy
16
+ ($( VENV_RUN) ; pip uninstall -y amazon_kclpy)
17
+ ($( VENV_RUN) ; cat requirements.txt | grep ' amazon_kclpy==' | xargs pip install --no-cache)
18
+ make compile
19
+
20
+ setup-venv :
11
21
(test ` which virtualenv` || pip install virtualenv || sudo pip install virtualenv)
12
22
(test -e $( VENV_DIR) || virtualenv $( VENV_DIR) )
13
23
($( VENV_RUN) && pip install --upgrade pip)
14
24
(test ! -e requirements.txt || ($( VENV_RUN) && pip install -r requirements.txt))
25
+
26
+ install-libs : # # Install npm/pip dependencies, compile code
15
27
(test -e localstack/infra/elasticsearch || { mkdir -p localstack/infra; cd localstack/infra; test -f $( TMP_ARCHIVE_ES) || (curl -o $( TMP_ARCHIVE_ES) $( ES_URL) ); cp $( TMP_ARCHIVE_ES) es.zip; unzip -q es.zip; mv elasticsearch* elasticsearch; rm es.zip; })
16
28
(test -e localstack/infra/amazon-kinesis-client/aws-java-sdk-sts.jar || { mkdir -p localstack/infra/amazon-kinesis-client; curl -o localstack/infra/amazon-kinesis-client/aws-java-sdk-sts.jar $( AWS_STS_URL) ; })
17
29
(npm install -g npm || sudo npm install -g npm)
18
30
(cd localstack/ && (test ! -e package.json || (npm install)))
19
- make compile
20
- # make install-web
21
31
22
32
install-web : # # Install npm dependencies for dashboard Web UI
23
33
(cd localstack/dashboard/web && (test ! -e package.json || npm install))
24
34
25
35
compile : # # Compile Java code (KCL library utils)
36
+ echo " Compiling"
37
+ $(VENV_RUN ) ; python -c ' from localstack.utils.kinesis import kclipy_helper; print kclipy_helper.get_kcl_classpath()'
26
38
javac -cp $(shell $(VENV_RUN ) ; python -c 'from localstack.utils.kinesis import kclipy_helper; print kclipy_helper.get_kcl_classpath() ' ) localstack/utils/kinesis/java/com/atlassian/*.java
27
39
# TODO enable once we want to support Java-based Lambdas
28
40
# (cd localstack/mock && mvn package)
@@ -57,4 +69,4 @@ clean: ## Clean up (npm dependencies, downloaded infrastructure code
57
69
rm -f localstack/utils/kinesis/java/com/atlassian/* .class
58
70
rm -f $(TMP_ARCHIVE_ES )
59
71
60
- .PHONY : usage compile clean install web install-web infra test
72
+ .PHONY : usage compile clean install web install-web infra test install-libs
0 commit comments