fog/Makefile

30 lines
570 B
Makefile
Raw Normal View History

2018-04-26 15:40:12 +00:00
# Variables
SOURCE = fog
# Commands
2018-04-27 10:59:14 +00:00
all: lint test
test: build-ext unit
2018-08-22 16:27:46 +00:00
publish: lint test upload clean
2018-04-27 12:54:40 +00:00
build-ext:
2018-08-23 13:41:34 +00:00
find . -name *.pyx | xargs cython
2018-04-27 12:54:40 +00:00
clean:
2018-08-23 13:41:34 +00:00
rm -rf *.egg-info .pytest_cache .ipynb_checkpoints build dist
find . -name __pycache__ -type d | xargs rm -rf
find . -name *.c -type f | xargs rm
2018-04-26 15:40:12 +00:00
lint:
@echo Linting source code using pep8...
2018-07-12 13:01:35 +00:00
pycodestyle --ignore E501,E722,E731,E741,W503,W504 $(SOURCE) test
2018-04-27 10:59:14 +00:00
@echo
unit:
@echo Running unit tests...
PYTHONHASHSEED=0 && pytest -s
2018-04-26 15:40:12 +00:00
@echo
2018-04-27 12:54:40 +00:00
upload:
python setup.py sdist bdist_wheel
twine upload dist/*