-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (53 loc) · 1.78 KB
/
Copy pathMakefile
File metadata and controls
63 lines (53 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
PLUGINNAME = nens_dependency_loader
default: compile
compile: external-dependencies/.generated.marker
# .generated.marker is generated by populate.sh to signify completion.
external-dependencies/.generated.marker: constraints.txt
cd external-dependencies && ./populate.sh
constraints.txt:
python3 dependencies.py
test: clean compile
QT_QPA_PLATFORM=offscreen pytest
zip: compile
@echo
@echo "---------------------------"
@echo "Creating plugin zip bundle."
@echo "---------------------------"
rm -rf /tmp/$(PLUGINNAME)
cd /tmp; cp -r $(CURDIR) $(PLUGINNAME)
# Remove all dev files
rm -rf /tmp/$(PLUGINNAME)/tests
rm -rf /tmp/$(PLUGINNAME)/.git
rm -rf /tmp/$(PLUGINNAME)/.gitignore
rm -rf /tmp/$(PLUGINNAME)/.pytest_cache
rm -rf /tmp/$(PLUGINNAME)/.github
rm -rf /tmp/$(PLUGINNAME)/*.zip
rm -rf /tmp/$(PLUGINNAME)/Dockerfile
rm -rf /tmp/$(PLUGINNAME)/docker-compose.yml
rm -rf /tmp/$(PLUGINNAME)/docker-compose.override.yml
rm -rf /tmp/$(PLUGINNAME)/Makefile
rm -rf /tmp/$(PLUGINNAME)/requirements-dev.txt
rm -rf /tmp/$(PLUGINNAME)/setup.cfg
rm -rf /tmp/$(PLUGINNAME)/upload-artifact.sh
rm -rf /tmp/$(PLUGINNAME)/upload-dev-artifact.sh
rm -rf /tmp/$(PLUGINNAME)/version.rst
rm -rf /tmp/$(PLUGINNAME)/.dockerignore
rm -rf /tmp/$(PLUGINNAME)/deps
rm -rf /tmp/$(PLUGINNAME)/__pycache__
find /tmp/$(PLUGINNAME) -iname "*.pyc" -delete
cd /tmp; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME)
check: constraints.txt
# Use pip-compile to check whether all dependencies version constraints are met.
cp constraints.txt requirements.in
pip-compile --dry-run
rm requirements.in
lint:
isort .
black .
@flake8 . --extend-exclude=deps
clean:
@echo
@echo "------------------------------------"
@echo "Deleting dependencies"
@echo "------------------------------------"
rm -rf deps