mirror of https://github.com/Kozea/pygal.git
Florian Mounier
8 years ago
5 changed files with 46 additions and 4 deletions
@ -0,0 +1,31 @@
|
||||
include Makefile.config |
||||
-include Makefile.custom.config |
||||
|
||||
all: install lint check check-outdated |
||||
|
||||
install: |
||||
test -d $(VENV) || virtualenv $(VENV) -p $(PYTHON_VERSION)
|
||||
$(PIP) install --upgrade --no-cache pip setuptools -e .[test] devcore
|
||||
|
||||
clean: |
||||
rm -fr $(VENV)
|
||||
rm -fr *.egg-info
|
||||
|
||||
lint: |
||||
$(PYTEST) --flake8 -m flake8 $(PROJECT_NAME)
|
||||
$(PYTEST) --isort -m isort $(PROJECT_NAME)
|
||||
|
||||
check: |
||||
$(PYTEST) $(PROJECT_NAME) $(PYTEST_ARGS) --cov-report= --cov=pygal
|
||||
|
||||
check-outdated: |
||||
$(PIP) list --outdated --format=columns
|
||||
|
||||
release: |
||||
git pull
|
||||
$(eval VERSION := $(shell PROJECT_NAME=$(PROJECT_NAME) $(VENV)/bin/devcore bump $(LEVEL)))
|
||||
git commit -am "Bump $(VERSION)"
|
||||
git tag $(VERSION)
|
||||
$(PYTHON) setup.py sdist bdist_wheel upload
|
||||
git push
|
||||
git push --tags
|
@ -0,0 +1,8 @@
|
||||
PROJECT_NAME = pygal
|
||||
|
||||
# Python env
|
||||
PYTHON_VERSION ?= python
|
||||
VENV = $(PWD)/.env$(if $(filter $(PYTHON_VERSION),python),,-$(PYTHON_VERSION))
|
||||
PIP = $(VENV)/bin/pip
|
||||
PYTHON = $(VENV)/bin/python
|
||||
PYTEST = $(VENV)/bin/py.test
|
Loading…
Reference in new issue