git: 18ee2b9f8091 - main - devel/py-atom: New port: Memory efficient Python objects

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 07 Oct 2025 08:19:49 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=18ee2b9f80918d9287669192ca928c1b8c088c49

commit 18ee2b9f80918d9287669192ca928c1b8c088c49
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-10-06 21:40:30 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-10-07 08:19:43 +0000

    devel/py-atom: New port: Memory efficient Python objects
---
 devel/Makefile                           |  1 +
 devel/py-atom/Makefile                   | 34 ++++++++++++++++++++++++++++++++
 devel/py-atom/distinfo                   |  3 +++
 devel/py-atom/files/patch-pyproject.toml | 21 ++++++++++++++++++++
 devel/py-atom/pkg-descr                  | 16 +++++++++++++++
 5 files changed, 75 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index f47cc02e0e25..89f97012289f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4451,6 +4451,7 @@
     SUBDIR += py-async_generator
     SUBDIR += py-async_timeout
     SUBDIR += py-asynctest
+    SUBDIR += py-atom
     SUBDIR += py-atomiclong
     SUBDIR += py-atpublic
     SUBDIR += py-attr
diff --git a/devel/py-atom/Makefile b/devel/py-atom/Makefile
new file mode 100644
index 000000000000..28d8656f9558
--- /dev/null
+++ b/devel/py-atom/Makefile
@@ -0,0 +1,34 @@
+PORTNAME=	atom
+DISTVERSION=	0.12.1
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Memory efficient Python objects
+WWW=		https://atom.readthedocs.io/en/latest/ \
+		https://github.com/nucleic/atom
+
+LICENSE=	BSD3CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cppy>0:devel/py-cppy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-benchmark>0:devel/py-pytest-benchmark@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-mypy-plugins>0:devel/py-pytest-mypy-plugins@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517 pytest
+
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+	@cd ${TEST_WRKSRC} && \
+		${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest tests/test_version.py tests/test_typing_utils.py -v
+
+# tests as of 0.12.1: 22 passed in 1.93s (limited to non-compiled module tests)
+
+.include <bsd.port.mk>
diff --git a/devel/py-atom/distinfo b/devel/py-atom/distinfo
new file mode 100644
index 000000000000..b53960fd4fbc
--- /dev/null
+++ b/devel/py-atom/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1759782668
+SHA256 (atom-0.12.1.tar.gz) = 2cbfb77939da28879a5432e3b201ac026be85c789c4e96de246a6f6a9f4be57a
+SIZE (atom-0.12.1.tar.gz) = 170161
diff --git a/devel/py-atom/files/patch-pyproject.toml b/devel/py-atom/files/patch-pyproject.toml
new file mode 100644
index 000000000000..4b6bdc047758
--- /dev/null
+++ b/devel/py-atom/files/patch-pyproject.toml
@@ -0,0 +1,21 @@
+--- pyproject.toml.orig	2024-12-10 10:30:00 UTC
++++ pyproject.toml
+@@ -11,8 +11,7 @@
+   description = "Memory efficient Python objects"
+   readme = "README.rst"
+   requires-python = ">=3.10"
+-  license = "BSD-3-Clause"
+-  license-files = ["LICENSE"]
++  license = {file = "LICENSE"}
+   authors = [{ name = "The Nucleic Development Team", email = "sccolbert@gmail.com" }]
+   maintainers = [{ name = "Matthieu C. Dartiailh", email = "m.dartiailh@gmail.com" }]
+   classifiers = [
+@@ -41,7 +40,7 @@
+     changelog = "https://github.com/nucleic/atom/blob/main/releasenotes.rst"
+ 
+ [build-system]
+-  requires = ["setuptools>=77.0", "wheel", "setuptools_scm[toml]>=3.4.3", "cppy>=1.2.0"]
++  requires = ["setuptools>=63.1.0", "wheel", "setuptools_scm[toml]>=3.4.3", "cppy>=1.2.0"]
+   build-backend = "setuptools.build_meta"
+ 
+ [tool.setuptools]
diff --git a/devel/py-atom/pkg-descr b/devel/py-atom/pkg-descr
new file mode 100644
index 000000000000..e945a0b3d499
--- /dev/null
+++ b/devel/py-atom/pkg-descr
@@ -0,0 +1,16 @@
+Atom is a framework for creating memory efficient Python objects with enhanced
+features such as dynamic initialization, validation, and change notification
+for object attributes. It provides the default model binding behavior for the
+Enaml UI framework.
+
+Key features:
+* Memory efficient object creation
+* Dynamic attribute initialization
+* Attribute validation
+* Change notification system
+* Type annotation support (atom 0.8.0+)
+* Enhanced property system
+
+Atom objects can be defined using traditional class-based approach or modern
+type annotations, making it suitable for both legacy and modern Python
+codebases.