Package design improvements

This commit is contained in:
Mark Vartanyan 2018-12-26 16:52:48 +03:00
parent f6390dbac2
commit 61b8d6a207
2 changed files with 11 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,10 +1,10 @@
# ===[ APP ]=== # # ===[ APP ]=== #
# ===[ PYTHON PACKAGE ]=== # # ===[ PYTHON PACKAGE ]=== #
/.tox/
/build/ /build/
/dist/ /dist/
/MANIFEST /MANIFEST
/*.egg/
/*.egg-info/ /*.egg-info/
# ===[ OTHER ]=== # # ===[ OTHER ]=== #
@ -25,6 +25,7 @@
Thumbs.db Thumbs.db
# Utils # Utils
/.tox/
.sass-cache/ .sass-cache/
.coverage .coverage

View File

@ -1,14 +1,14 @@
all: all:
SHELL := /bin/bash SHELL := /bin/bash
.PHONY: clean build publish .PHONY: clean build publish test test-tox test-docker
# Package # Package
clean: clean:
@rm -rf build/ dist/ *.egg-info/ README.md README.rst @rm -rf build/ dist/ *.egg-info/ README.md README.rst
@pip install -e . # have to reinstall because we are using self @pip install -e . # have to reinstall because we are using self
README.md: $(shell find misc/ j2cli/) README.md: $(shell find misc/ j2cli/)
@python misc/_doc/README.py | python j2cli/__init__.py -f json misc/_doc/README.md.j2 > $@ @python misc/_doc/README.py | python j2cli/__init__.py -f json -o $@ misc/_doc/README.md.j2
README.rst: README.md README.rst: README.md
@pandoc -f markdown -t rst -o README.rst README.md @pandoc -f markdown -t rst -o README.rst README.md
@ -20,6 +20,11 @@ publish: README.rst
@twine upload dist/* @twine upload dist/*
test:
test-2.6: @nosetests
test-tox:
@tox
test-docker:
@docker run --rm -it -v `pwd`:/src themattrix/tox
test-docker-2.6: # temporary, since `themattrix/tox` has faulty 2.6
@docker run --rm -it -v $(realpath .):/app mrupgrade/deadsnakes:2.6 bash -c 'cd /app && pip install -e . && pip install nose argparse && nosetests' @docker run --rm -it -v $(realpath .):/app mrupgrade/deadsnakes:2.6 bash -c 'cd /app && pip install -e . && pip install nose argparse && nosetests'