fog/Makefile

32 lines
644 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-23 13:42:27 +00:00
publish: lint test build-ext upload clean
2018-04-27 12:54:40 +00:00
build-ext:
2018-08-23 14:36:41 +00:00
@echo Building native extensions...
2018-08-23 14:03:41 +00:00
find . -name *.pyx | xargs cython && find . -name *.c
2018-08-23 14:36:41 +00:00
@echo
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/*