-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
54 lines (47 loc) · 1.23 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
# Makefile
# Variables
PROJECT_NAME = aeronet
LIBRARIES = aeronet_raster aeronet_vector aeronet_convert
.PHONY: build upload clean
# Build all libraries
build:
@for lib in $(LIBRARIES); do \
echo "Building $$lib"; \
cd $$lib; \
python3 setup.py build sdist bdist_wheel --universal; \
cd ..;\
done
@echo "Building $(PROJECT_NAME) library"
python3 setup.py build sdist bdist_wheel
# Upload all packages to PyPI using twine
upload:
@for lib in $(LIBRARIES); do \
echo "Uploading $$lib"; \
twine upload --skip-existing $$lib/dist/*; \
done
@echo "Uploading $(PROJECT_NAME) library"
twine upload --skip-existing dist/*
# Clean up build artifacts for all libraries
clean:
@for lib in $(LIBRARIES); do \
echo "Cleaning $$lib"; \
cd $$lib; \
rm -rf build dist *.egg-info; \
cd ..; \
done
@echo "Cleaning $(PROJECT_NAME) library"
rm -rf build dist *.egg-info
# Install all the requirements (activate venv first!)
prepare:
@for lib in $(LIBRARIES); do \
echo "Installing requirements for $$lib"; \
cd $$lib; \
pip install -r requirements.txt; \
cd ..; \
done
# Install all the requirements (activate venv first!)
test:
@for lib in $(LIBRARIES); do \
echo "Testing $$lib"; \
python3 -m pytest $$lib/test; \
done