forked from jmcnamara/XlsxWriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
92 lines (72 loc) · 2.43 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Simple Makefile for the XlsxWriter project.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 2013-2023, John McNamara, [email protected]
#
.PHONY: docs
docs doc:
@make -C dev/docs html
docs_external:
@../build_readthedocs.sh
pdf:
@make -C dev/docs latexpdf
linkcheck:
@make -C dev/docs linkcheck
clean:
@make -C dev/docs clean
alldocs: clean docs pdf
@cp -r dev/docs/build/html docs
@cp -r dev/docs/build/latex/XlsxWriter.pdf docs
pdf_release: pdf
@cp -r dev/docs/build/latex/XlsxWriter.pdf docs
install:
@python setup.py install
@rm -rf build
test:
@~/.pythonbrew/pythons/Python-3.9.0/bin/python -m unittest discover
# Test with stable Python 3 releases.
testpythons:
@echo "Testing with Python 3.6.6:"
@~/.pythonbrew/pythons/Python-3.6.6/bin/py.test -q
@echo "Testing with Python 3.7.0:"
@~/.pythonbrew/pythons/Python-3.7.0/bin/py.test -q
@echo "Testing with Python 3.8.0:"
@~/.pythonbrew/pythons/Python-3.8.0/bin/py.test -q
@echo "Testing with Python 3.9.0:"
@~/.pythonbrew/pythons/Python-3.9.0/bin/py.test -q
@echo "Testing with Python 3.10.0:"
@~/.pythonbrew/pythons/Python-3.10.0/bin/py.test -q
@echo "Testing with Python 3.11.1:"
@~/.pythonbrew/pythons/Python-3.11.1/bin/py.test -q
test_flake8:
@ls -1 xlsxwriter/*.py | egrep -v "theme|__init__" | xargs flake8 --show-source --max-line-length=88 --ignore=E203,W503
@flake8 --ignore=E501 xlsxwriter/theme.py
@find xlsxwriter/test -name \*.py | xargs flake8 --ignore=E501,F841,W503
lint:
@ruff xlsxwriter/*.py
@ruff xlsxwriter/test --ignore=E501,F841
@ruff examples
@black --check xlsxwriter/ examples/
tags:
$(Q)rm -f TAGS
$(Q)etags xlsxwriter/*.py
testwarnings:
@python -Werror -c 'from xlsxwriter import Workbook'
spellcheck:
@for f in dev/docs/source/*.rst; do aspell --lang=en_US --check $$f; done
@for f in *.md; do aspell --lang=en_US --check $$f; done
@for f in xlsxwriter/*.py; do aspell --lang=en_US --check $$f; done
@for f in xlsxwriter/test/comparison/*.py; do aspell --lang=en_US --check $$f; done
@for f in examples/*.py; do aspell --lang=en_US --check $$f; done
@aspell --lang=en_US --check Changes
releasecheck:
@dev/release/release_check.sh
release: releasecheck
@git push origin main
@git push --tags
@rm -rf dist/ build/ XlsxWriter.egg-info/
@python3 setup.py sdist bdist_wheel
@twine upload dist/*
@rm -rf dist/ build/ XlsxWriter.egg-info/
@../build_readthedocs.sh