Skip to content

Commit d23b5fb

Browse files
FIx Makefile with Python 3 command names
Use `python3` instead of `python`. Try `pytest-3` if `pytest` is not available.
1 parent 458de80 commit d23b5fb

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ check-dictionaries:
2929
done
3030
@if command -v pytest > /dev/null; then \
3131
pytest codespell_lib/tests/test_dictionary.py; \
32+
elif command -v pytest-3 > /dev/null; then \
33+
pytest-3 codespell_lib/tests/test_dictionary.py; \
3234
else \
3335
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
3436
exit 1; \
@@ -48,13 +50,20 @@ check-manifest:
4850
check-manifest --no-build-isolation
4951

5052
check-distutils:
51-
python setup.py check --restructuredtext --strict
53+
python3 setup.py check --restructuredtext --strict
5254

5355
flake8:
5456
flake8
5557

5658
pytest:
57-
pytest codespell_lib
59+
@if command -v pytest > /dev/null; then \
60+
pytest codespell_lib; \
61+
elif command -v pytest-3 > /dev/null; then \
62+
pytest-3 codespell_lib; \
63+
else \
64+
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
65+
exit 1; \
66+
fi
5867

5968
clean:
6069
rm -rf codespell.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env python
1+
#! /usr/bin/env python3
22

33
from setuptools import setup
44

0 commit comments

Comments
 (0)