8000 makefile: simplify tasks · Nasdaq/data-link-python@56660af · GitHub
[go: up one dir, main page]

Skip to content

Commit 56660af

Browse files
committed
makefile: simplify tasks
Add project makefile to simplify repetitive tasks. Add targets for various chores such as linting, tests and project setup. Signed-off-by: Jamie Couture <jamie.couture@nasdaq.com>
1 parent 7a4fc9c commit 56660af

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# default makefile target
2+
all::
3+
4+
5+
.PHONY: help
6+
help:
7+
echo "clean - removes all untracked files"
8+
echo "lint - run flake8"
9+
echo "package - create package for pypi"
10+
echo "setup - install project and maintainer dependencies"
11+
echo "test - run tests"
12+
echo "upload - create and upload distribution for pypi"
13+
echo "upload-test - create and upload distribution for testpypi"
14+
15+
.PHONY: clean
16+
clean:
17+
git clean -fxd
18+
19+
.PHONY: upload
20+
upload: package
21+
python -m twine upload --repository nasdaq-data-link --non-interactive dist/*
22+
23+
.PHONY: upload-test
24+
upload-test: package
25+
python -m twine upload --repository test-nasdaq-data-link --non-interactive --verbose dist/*
26+
27+
.PHONY: lint
28+
lint:
29+
flake8
30+
31+
.PHONY: package
32+
package: clean
33+
python setup.py sdist bdist_wheel
34+
35+
.PHONY: setup
36+
setup:
37+
pip install --upgrade pip
38+
pip install -r requirements.txt
39+
pip install setuptools wheel twine
40+
pip install flake8
41+
pip install tox
42+
43+
.PHONY: test
44+
test:
45+
tox

0 commit comments

Comments
 (0)
0