Skip to content

Commit

Permalink
FIx Makefile with Python 3 command names
Browse files Browse the repository at this point in the history
Use `python3` instead of `python`.

Try `pytest-3` if `pytest` is not available.
  • Loading branch information
DimitriPapadopoulos committed Oct 30, 2022
1 parent 458de80 commit d23b5fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ check-dictionaries:
done
@if command -v pytest > /dev/null; then \
pytest codespell_lib/tests/test_dictionary.py; \
elif command -v pytest-3 > /dev/null; then \
pytest-3 codespell_lib/tests/test_dictionary.py; \
else \
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
exit 1; \
Expand All @@ -48,13 +50,20 @@ check-manifest:
check-manifest --no-build-isolation

check-distutils:
python setup.py check --restructuredtext --strict
python3 setup.py check --restructuredtext --strict

flake8:
flake8

pytest:
pytest codespell_lib
@if command -v pytest > /dev/null; then \
pytest codespell_lib; \
elif command -v pytest-3 > /dev/null; then \
pytest-3 codespell_lib; \
else \
echo "Test dependencies not present, install using 'pip install -e \".[dev]\"'"; \
exit 1; \
fi

clean:
rm -rf codespell.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3

from setuptools import setup

Expand Down

0 comments on commit d23b5fb

Please sign in to comment.