kopia lustrzana https://gitlab.com/gerbolyze/gerbonara
Update Makefile
rodzic
ba5bf67235
commit
1c9dcc1a9f
34
Makefile
34
Makefile
|
@ -1,45 +1,45 @@
|
||||||
|
PYTHON ?= python
|
||||||
|
PYTEST ?= pytest
|
||||||
|
SPHINX_BUILD ?= sphinx-build
|
||||||
|
|
||||||
PYTHON ?= python
|
.DEFAULT_GOAL := help
|
||||||
PYTEST ?= pytest
|
|
||||||
SPHINX_BUILD ?= sphinx-build
|
.PHONY: clean docs test test-coverage install sdist bdist_wheel upload testupload help
|
||||||
|
|
||||||
all: docs sdist bdist_wheel
|
all: docs sdist bdist_wheel
|
||||||
|
|
||||||
.PHONY: clean
|
clean: ## Clean up project directory
|
||||||
clean:
|
|
||||||
find . -name '*.pyc' -delete
|
find . -name '*.pyc' -delete
|
||||||
rm -rf *.egg-info
|
rm -rf *.egg-info
|
||||||
rm -f .coverage
|
rm -f .coverage
|
||||||
rm -f coverage.xml
|
rm -f coverage.xml
|
||||||
rm -rf docs/_build
|
rm -rf docs/_build
|
||||||
|
|
||||||
.PHONY: docs
|
docs: ## Generate documentation
|
||||||
docs:
|
|
||||||
sphinx-build -E docs docs/_build
|
sphinx-build -E docs docs/_build
|
||||||
|
|
||||||
.PHONY: test
|
test: ## Run tests
|
||||||
test:
|
|
||||||
$(PYTEST)
|
$(PYTEST)
|
||||||
|
|
||||||
.PHONY: test-coverage
|
test-coverage: ## Generate coverage
|
||||||
test-coverage:
|
|
||||||
rm -f .coverage
|
rm -f .coverage
|
||||||
rm -f coverage.xml
|
rm -f coverage.xml
|
||||||
$(PYTEST) --cov=./ --cov-report=xml
|
$(PYTEST) --cov=./ --cov-report=xml
|
||||||
|
|
||||||
.PHONY: install
|
install: ## Install locally
|
||||||
install:
|
|
||||||
PYTHONPATH=. $(PYTHON) setup.py install
|
PYTHONPATH=. $(PYTHON) setup.py install
|
||||||
|
|
||||||
sdist:
|
sdist: ## Build source distribution
|
||||||
python3 setup.py sdist
|
python3 setup.py sdist
|
||||||
|
|
||||||
bdist_wheel:
|
bdist_wheel: ## Build binary distribution
|
||||||
python3 setup.py bdist_wheel
|
python3 setup.py bdist_wheel
|
||||||
|
|
||||||
upload: sdist bdist_wheel
|
upload: sdist bdist_wheel ## Upload Python package to PyPI
|
||||||
twine upload -s -i gerbonara@jaseg.de --config-file ~/.pypirc --skip-existing --repository pypi dist/*
|
twine upload -s -i gerbonara@jaseg.de --config-file ~/.pypirc --skip-existing --repository pypi dist/*
|
||||||
|
|
||||||
testupload: sdist bdist_wheel
|
testupload: sdist bdist_wheel ## Upload Python package to test PyPI
|
||||||
twine upload --config-file ~/.pypirc --skip-existing --repository testpypi dist/*
|
twine upload --config-file ~/.pypirc --skip-existing --repository testpypi dist/*
|
||||||
|
|
||||||
|
help: ## Display this help
|
||||||
|
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
Ładowanie…
Reference in New Issue