-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
77 lines (56 loc) · 1.97 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# This file is part of `yaml2rst`.
# Based on prior work from `gitflow`
# Copyright (c) 2010-2011 Vincent Driessen
# Copyright (c) 2012-2019 Hartmut Goebel
# Distributed under a BSD-like license.
#
.PHONY : all clean celan-files clean-all clean-tox
.PHONY : xunit-test test test-dist cover
.PHONY : dump-requirements install-requirements
.PHONY : dist examples test-upload test-install
all: cover
clean: clean-files
clean-files:
find . -name '*.py[co]' -delete
rm -rf *.egg *.egg-info
rm -f nosetests.xml *.egg-lnk pip-log.txt
clean-all: clean-tox clean
rm -rf build dist .coverage examples/*.rst examples/*.html
clean-tox:
rm -rf .tox
xunit-test:
nosetests --with-xunit
test:
nosetests --with-spec --spec-color
test-dist:
PIP_DOWNLOAD_CACHE=~/Projects/pkgrepo/pkgs
tox
cover:
nosetests --with-coverage3 --cover-package=gitflow --with-spec --spec-color
dump-requirements:
pip freeze -l > requirements.txt
install-requirements:
pip install -r requirements.txt
dist:
@# ensure a clean build
rm -rf build
python setup.py sdist bdist_wheel
examples: examples/main.rst examples/main.html tests/patternsTest.html
examples/main.rst: examples/fold-markers-debops.yml examples/main.yml
PYTHONPATH=.
sed --regexp-extended 's/(\.\. )envvar(::)/\1note\2/;' $? \
| bin/yaml2rst - "$@" --strip-regex '\s*(:?\[{3}|\]{3})\d?$$' --yaml-strip-regex '^\s{66,67}#\s\]{3}\d?$$'
## --no-generator does not do the trick on Debian Jessie.
examples/main.html: examples/main.rst examples/demo.css
rst2html --stylesheet=examples/demo.css "$<" | grep --invert-match --fixed-strings '<meta name="generator"' > "$@"
tests/patternsTest.html: tests/patternsTest.rst examples/demo.css
rst2html --stylesheet=examples/demo.css "$<" > "$@"
#-- interaction with PyPI
test-upload: dist
twine upload --sign -r https://testpypi.python.org/pypi
test-install:
virtualenv /tmp/test-yaml2rst
/tmp/test-yaml2rst/bin/pip install -i https://testpypi.python.org/pypi yaml2rst
upload: dist
twine upload --sign