Browse Source

Add Makefile

pull/329/merge
Florian Mounier 8 years ago
parent
commit
859277e432
  1. 2
      .gitignore
  2. 7
      .travis.yml
  3. 31
      Makefile
  4. 8
      Makefile.config
  5. 2
      setup.cfg

2
.gitignore vendored

@ -11,3 +11,5 @@ junit-py*
docs/_build
.cache
build
.env*
.eggs

7
.travis.yml

@ -9,10 +9,11 @@ python:
# - pypy still no pypy 2.6
install:
- pip install --upgrade pip setuptools
- pip install --upgrade .[test]
- make install
script: py.test pygal/ --flake8 --cov-report= --cov=pygal
script:
- make lint
- make check
after_success: coveralls

31
Makefile

@ -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

8
Makefile.config

@ -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

2
setup.cfg

@ -1,7 +1,7 @@
[wheel]
universal = 1
[pytest]
[tool:pytest]
flake8-ignore =
*.py E731 E402
pygal/__init__.py F401

Loading…
Cancel
Save