Skip to content

Commit

Permalink
consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantgoel committed Oct 31, 2018
1 parent 611d908 commit 4b953a7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ help:
$(info test-all - install locally, prepare for PyPI, run tests, speed test, profiler)
$(info build - prepare PyPI module archive)
$(info upload - upload built module archive to PyPI)
$(info install_local - build the module in the current directory)
$(info install-local - build the module in the current directory)
$(info it will be available for import from the project root directory)
$(info test - run tests and check code formatting)
$(info profile - gather library function call statistics (time, count, ...))
Expand All @@ -16,49 +16,49 @@ clean:
rm -rf dist/
rm -rf streaming_form_data.egg-info

cython_file := streaming_form_data/_parser.pyx
install_local_output := build/install.touch
requirements_output := build/requirements.touch
cython-file := streaming_form_data/_parser.pyx
install-local-output := build/install.touch
requirements-output := build/requirements.touch

test-all: build test speedtest profile annotate ;

build: $(requirements_output)
build: $(requirements-output)
python setup.py sdist
@echo "Build PyPI archive is complete."

upload: build
twine upload dist/*

install_local: $(install_local_output) ;
install-local: $(install-local-output) ;

test: $(install_local_output)
test: $(install-local-output)
py.test
flake8

speedtest: $(install_local_output)
speedtest: $(install-local-output)
python utils/speedtest.py

profile: $(install_local_output)
profile: $(install-local-output)
python utils/profile.py --data-size 17555000 -c binary/octet-stream

annotate: $(requirements_output)
annotate: $(requirements-output)
mkdir -p build
cython -a $(cython_file) -o build/annotation.html
cython -a $(cython-file) -o build/annotation.html

# All targets where the names do not match any real file name

.PHONY: help clean test-all build upload install_local test speedtest profile annotate
.PHONY: help clean test-all build upload install-local test speedtest profile annotate

# Real file rules

library_inputs := setup.py \
$(shell find streaming_form_data -maxdepth 1 -name "*.py") \
$(cython_file)
$(cython-file)

$(requirements_output):
$(requirements-output):
pipenv install --dev
@mkdir -p "$(@D)" && touch "$@"

$(install_local_output): $(requirements_output) $(library_inputs)
$(install-local-output): $(requirements-output) $(library_inputs)
pipenv install
@mkdir -p "$(@D)" && touch "$@"

0 comments on commit 4b953a7

Please sign in to comment.