git: 449985e3a2c5 - main - textproc/py-codespell: New port: Fix common misspellings in text files

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 06:05:51 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=449985e3a2c5d3b16f323351d1497436f0c3959a

commit 449985e3a2c5d3b16f323351d1497436f0c3959a
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-10-06 04:12:48 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-10-06 06:05:48 +0000

    textproc/py-codespell: New port: Fix common misspellings in text files
    
    PR:             299068
    Approved by:    Baptiste Daroussin <bapt@FreeBSD.org> (on behalf of portmgr@)
---
 textproc/Makefile                                |  1 +
 textproc/py-codespell/Makefile                   | 23 +++++++++++++++++++++++
 textproc/py-codespell/distinfo                   |  3 +++
 textproc/py-codespell/files/patch-pyproject.toml | 19 +++++++++++++++++++
 textproc/py-codespell/pkg-descr                  |  3 +++
 5 files changed, 49 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index d93d16db3f8f..1e599c649376 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1376,6 +1376,7 @@
     SUBDIR += py-cjkwrap
     SUBDIR += py-cloud_sptheme
     SUBDIR += py-cmarkgfm
+    SUBDIR += py-codespell
     SUBDIR += py-collective.checkdocs
     SUBDIR += py-comrak
     SUBDIR += py-conllu
diff --git a/textproc/py-codespell/Makefile b/textproc/py-codespell/Makefile
new file mode 100644
index 000000000000..0b9d8967a518
--- /dev/null
+++ b/textproc/py-codespell/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	codespell
+DISTVERSION=	2.4.3
+CATEGORIES=	textproc python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Fix common misspellings in text files
+WWW=		https://github.com/codespell-project/codespell
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-codespell/distinfo b/textproc/py-codespell/distinfo
new file mode 100644
index 000000000000..db5e36c7b3e2
--- /dev/null
+++ b/textproc/py-codespell/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1791259512
+SHA256 (codespell-2.4.3.tar.gz) = cbe085e331227b37bb86ef8bddd08dc768c704ee9a07ca869852c093fa2793e2
+SIZE (codespell-2.4.3.tar.gz) = 352773
diff --git a/textproc/py-codespell/files/patch-pyproject.toml b/textproc/py-codespell/files/patch-pyproject.toml
new file mode 100644
index 000000000000..474fb25563fa
--- /dev/null
+++ b/textproc/py-codespell/files/patch-pyproject.toml
@@ -0,0 +1,19 @@
+--- pyproject.toml.orig	2026-07-15 11:51:21 UTC
++++ pyproject.toml
+@@ -5,7 +5,6 @@ requires-python = ">=3.9"
+ description = "Fix common misspellings in text files"
+ readme = { file = "README.rst", content-type = "text/x-rst" }
+ requires-python = ">=3.9"
+-license = "GPL-2.0-only"
+ authors = [
+     {name = "Lucas De Marchi", email = "lucas.de.marchi@gmail.com"},
+ ]
+@@ -67,7 +66,7 @@ build-backend = "setuptools.build_meta"
+ 
+ [build-system]
+ build-backend = "setuptools.build_meta"
+-requires = ["setuptools>=77", "setuptools_scm[toml]>=6.2, != 8.0.0"]
++requires = ["setuptools", "setuptools_scm[toml]"]
+ 
+ [tool.setuptools_scm]
+ write_to = "codespell_lib/_version.py"
diff --git a/textproc/py-codespell/pkg-descr b/textproc/py-codespell/pkg-descr
new file mode 100644
index 000000000000..15c4f7158679
--- /dev/null
+++ b/textproc/py-codespell/pkg-descr
@@ -0,0 +1,3 @@
+Codespell fixes common misspellings in text files. It's designed
+primarily for checking fragmented code and documentation, but can also
+be used for other types of text.