-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d88476
commit 12df119
Showing
6 changed files
with
77 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
language: python | ||
|
||
cache: pip | ||
|
||
python: | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
|
||
install: | ||
- pip install pipenv | ||
- make install-local | ||
- make install-deps | ||
- make build | ||
|
||
script: | ||
- make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,57 @@ | ||
help: | ||
$(info The following make commands are available:) | ||
$(info clean - remove all generated files and directories) | ||
$(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 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, ...)) | ||
$(info speedtest - calculate library bandwidth) | ||
@: | ||
cython-file := streaming_form_data/_parser.pyx | ||
|
||
clean: | ||
rm -rf build/ | ||
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 | ||
# | ||
# Development | ||
# | ||
|
||
test-all: build test speedtest profile annotate ; | ||
annotate: | ||
cython -a $(cython-file) -o build/annotation.html | ||
|
||
build: $(requirements-output) | ||
python setup.py sdist | ||
@echo "Build PyPI archive is complete." | ||
compile: | ||
cython $(cython-file) | ||
|
||
upload: build | ||
twine upload dist/* | ||
test: | ||
flake8 | ||
py.test | ||
|
||
install-local: $(install-local-output) ; | ||
update-deps: | ||
pip-compile requirements.dev.in > requirements.dev.txt | ||
|
||
test: $(install-local-output) | ||
py.test | ||
flake8 | ||
install-deps: | ||
pip install -r requirements.dev.txt | ||
|
||
speedtest: $(install-local-output) | ||
python utils/speedtest.py | ||
build: | ||
python setup.py build_ext --inplace | ||
|
||
profile: $(install-local-output) | ||
python utils/profile.py --data-size 17555000 -c binary/octet-stream | ||
local: update-deps install-deps build | ||
|
||
annotate: $(requirements-output) | ||
mkdir -p build | ||
cython -a $(cython-file) -o build/annotation.html | ||
# | ||
# Utils | ||
# | ||
|
||
# All targets where the names do not match any real file name | ||
speed-test: | ||
python utils/speedtest.py | ||
|
||
.PHONY: help clean test-all build upload install-local test speedtest profile annotate | ||
profile: | ||
python utils/profile.py --data-size 17555000 -c binary/octet-stream | ||
|
||
# Real file rules | ||
# | ||
# PyPI | ||
# | ||
|
||
library_inputs := setup.py \ | ||
$(shell find streaming_form_data -maxdepth 1 -name "*.py") \ | ||
$(cython-file) | ||
dist: | ||
python setup.py sdist | ||
|
||
$(requirements-output): | ||
pipenv install --dev | ||
@mkdir -p "$(@D)" && touch "$@" | ||
publish: package | ||
twine upload dist/* | ||
|
||
$(install-local-output): $(requirements-output) $(library_inputs) | ||
pipenv install | ||
@mkdir -p "$(@D)" && touch "$@" | ||
.PHONY: clean \ | ||
annotate compile test \ | ||
speed-test profile \ | ||
update-deps install-deps build local \ | ||
dist publish |
Oops, something went wrong.