forked from sentinel-hub/eo-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
150 lines (119 loc) · 2.97 KB
/
Makefile
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Makefile for creating a new release of the package and uploading it to PyPI
PYTHON = python3
PACKAGES = core coregistration features geometry io mask ml_tools
.PHONY: $(PACKAGES:test)
help:
@echo "Use 'make upload-<package>' to upload the package to PyPi"
@echo "Use 'make pylint' to run pylint on the code of all subpackages"
pylint:
pylint core/eolearn/core/*.py
pylint coregistration/eolearn/coregistration/*.py
pylint features/eolearn/features/*.py
pylint geometry/eolearn/geometry/*.py
pylint io/eolearn/io/*.py
pylint mask/eolearn/mask/*.py
pylint ml_tools/eolearn/ml_tools/*.py
.ONESHELL:
build-core:
cd core
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-coregistration:
cd coregistration
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-features:
cd features
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-geometry:
cd geometry
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-io:
cd io
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-mask:
cd mask
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-ml-tools:
cd ml_tools
cp ../LICENSE LICENSE
rm -r dist
$(PYTHON) setup.py sdist
rm LICENSE
.ONESHELL:
build-abstract-package:
rm -r dist
$(PYTHON) setup.py sdist
upload-core: build-core
twine upload core/dist/*
upload-coregistration: build-coregistration
twine upload coregistration/dist/*
upload-features: build-features
twine upload features/dist/*
upload-geometry: build-geometry
twine upload geometry/dist/*
upload-io: build-io
twine upload io/dist/*
upload-mask: build-mask
twine upload mask/dist/*
upload-ml-tools: build-ml-tools
twine upload ml_tools/dist/*
upload-abstract-package: build-abstract-package
twine upload dist/*
upload-all: \
upload-core \
upload-coregistration \
upload-features \
upload-geometry \
upload-io \
upload-mask \
upload-ml-tools \
upload-abstract-package
# For testing:
test-upload-core: build-core
twine upload --repository testpypi core/dist/*
test-upload-coregistration: build-coregistration
twine upload --repository testpypi coregistration/dist/*
test-upload-features: build-features
twine upload --repository testpypi features/dist/*
test-upload-geometry: build-geometry
twine upload --repository testpypi geometry/dist/*
test-upload-io: build-io
twine upload --repository testpypi io/dist/*
test-upload-mask: build-mask
twine upload --repository testpypi mask/dist/*
test-upload-ml-tools: build-ml-tools
twine upload --repository testpypi ml_tools/dist/*
test-upload-abstract-package: build-abstract-package
twine upload --repository testpypi dist/*
test-upload-all: \
test-upload-core \
test-upload-coregistration \
test-upload-features \
test-upload-geometry \
test-upload-io \
test-upload-mask \
test-upload-ml-tools \
test-upload-abstract-package