Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove setup.py
Browse files Browse the repository at this point in the history
With pyproject.toml, setup.py becomes unnecessary. Future versions of
setuptools (and Python packaging in general) will deprecate the file.

The command `setup.py check` was replaced by `twine check` which serves
a similar role.

setuptools is still a dependency of the build, just doesn't require
setup.py.

Fixes codespell-project#2606
jdufresne committed Nov 28, 2022
1 parent 041bd02 commit 0f7cc47
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codespell-private.yml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ jobs:
run: |
python --version # just to check
pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
pip install --upgrade chardet "setuptools!=47.2.0" docutils setuptools_scm[toml]
pip install --upgrade chardet "setuptools!=47.2.0" docutils setuptools_scm[toml] twine
pip install aspell-python-py3
pip install -e ".[dev]" # install the codespell dev packages
- run: codespell --help
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@ SORT_ARGS := -f -b

DICTIONARIES := codespell_lib/data/dictionary*.txt

PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary check-manifest check-distutils flake8 pytest pypi clean
PHONY := all check check-dictionaries sort-dictionaries trim-dictionaries check-dictionary sort-dictionary trim-dictionary check-manifest check-dist flake8 pytest pypi clean

all: check-dictionaries codespell.1

check: check-dictionaries check-manifest check-distutils flake8 pytest
check: check-dictionaries check-manifest check-dist flake8 pytest

check-dictionary: check-dictionaries
sort-dictionary: sort-dictionaries
@@ -47,8 +47,11 @@ trim-dictionaries:
check-manifest:
check-manifest --no-build-isolation

check-distutils:
python setup.py check --restructuredtext --strict
check-dist:
$(eval TMP := $(shell mktemp -d))
python -m build -o $(TMP)
twine check --strict $(TMP)/*
rm -rf $(TMP)

flake8:
flake8
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@ types = [
"mypy",
"pytest",
"types-chardet",
"types-setuptools",
]

[project.scripts]
6 changes: 0 additions & 6 deletions setup.py

This file was deleted.

0 comments on commit 0f7cc47

Please sign in to comment.