Skip to content

Commit 1199ce6

Browse files
committed
Remove setup.py
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 #2606
1 parent 041bd02 commit 1199ce6

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

.github/workflows/codespell-private.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
python --version # just to check
3636
pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors
37-
pip install --upgrade chardet "setuptools!=47.2.0" docutils setuptools_scm[toml]
37+
pip install --upgrade chardet "setuptools!=47.2.0" docutils setuptools_scm[toml] twine
3838
pip install aspell-python-py3
3939
pip install -e ".[dev]" # install the codespell dev packages
4040
- run: codespell --help

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ SORT_ARGS := -f -b
22

33
DICTIONARIES := codespell_lib/data/dictionary*.txt
44

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

77
all: check-dictionaries codespell.1
88

9-
check: check-dictionaries check-manifest check-distutils flake8 pytest
9+
check: check-dictionaries check-manifest check-dist flake8 pytest
1010

1111
check-dictionary: check-dictionaries
1212
sort-dictionary: sort-dictionaries
@@ -47,8 +47,11 @@ trim-dictionaries:
4747
check-manifest:
4848
check-manifest --no-build-isolation
4949

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

5356
flake8:
5457
flake8

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ cache:
1313

1414
install:
1515
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
16+
- "pip install -U pip"
1617
- "pip install codecov chardet setuptools"
1718
- "pip install -e \".[dev]\"" # install the codespell dev packages
18-
- "python setup.py develop"
1919

2020
build: false # Not a C# project, build stuff at the test step instead.
2121

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ types = [
4949
"mypy",
5050
"pytest",
5151
"types-chardet",
52-
"types-setuptools",
5352
]
5453

5554
[project.scripts]

setup.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)