-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
38 lines (27 loc) · 847 Bytes
/
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
PKG_DIR = linkbudget
PKG_NAME = link-budget
PY_FILES = $(shell find . -type f -name '*.py')
VERSION = $(shell grep "__version__ =" $(PKG_DIR)/cli.py | cut -d '"' -f2)
SDIST = dist/$(PKG_NAME)-$(VERSION).tar.gz
WHEEL = dist/$(PKG_NAME)-$(VERSION)-py3-none-any.whl
.PHONY: all clean clean-py sdist wheel install pypi testpypi
all: sdist
clean: clean-py
clean-py:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
$(SDIST): $(PY_FILES)
python3 setup.py sdist
sdist: $(SDIST)
$(WHEEL): $(PY_FILES)
python3 setup.py bdist_wheel
wheel: $(WHEEL)
install: $(SDIST)
pip3 install $(SDIST)
pypi: clean sdist wheel
python3 -m twine upload --repository pypi dist/*
testpypi: clean sdist wheel
python3 -m twine upload --repository testpypi dist/*