git: 22eec87bda6d - main - cad/py-cocotb: update 2.0.1 → 2.1.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 12 Sep 2026 00:37:48 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=22eec87bda6da8815cc0de7d219528ba95942085
commit 22eec87bda6da8815cc0de7d219528ba95942085
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-11 18:24:05 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-12 00:37:22 +0000
cad/py-cocotb: update 2.0.1 → 2.1.0
---
cad/py-cocotb/Makefile | 17 +++++++++-----
cad/py-cocotb/distinfo | 6 ++---
cad/py-cocotb/files/patch-.git_archival.txt | 13 +++++++++++
cad/py-cocotb/files/patch-pyproject.toml | 35 +++++++++++++++++++++++++++++
4 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/cad/py-cocotb/Makefile b/cad/py-cocotb/Makefile
index e61f0785958b..8c64d798ba93 100644
--- a/cad/py-cocotb/Makefile
+++ b/cad/py-cocotb/Makefile
@@ -1,12 +1,13 @@
PORTNAME= cocotb
DISTVERSIONPREFIX= v
-DISTVERSION= 2.0.1
+DISTVERSION= 2.1.0
CATEGORIES= cad python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= Coroutine based cosimulation library for writing VHDL and Verilog
-WWW= https://www.cocotb.org/
+WWW= https://www.cocotb.org/ \
+ https://github.com/cocotb/cocotb
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
@@ -14,6 +15,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}find-libpython>0:devel/py-find-libpython@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest>=6:devel/py-pytest@${PY_FLAVOR} \
gtkwave:cad/gtkwave
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
@@ -30,6 +32,8 @@ TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} \
LD_LIBRARY_PATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/cocotb/libs \
SIM=icarus
+BINARY_ALIAS= python=${PYTHON_CMD} # for tests
+
OPTIONS_DEFINE= IVERILOG VERILATOR # GHDL - TODO
OPTIONS_DEFAULT= IVERILOG VERILATOR
@@ -41,6 +45,10 @@ VERILATOR_RUN_DEPENDS= verilator:cad/verilator
.include <bsd.port.pre.mk>
+.if ${PYTHON_REL} < 31100
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>0:devel/py-exceptiongroup@${PY_FLAVOR}
+.endif
+
.if ${OSVERSION} < 1500000
BROKEN_i386= error: "don't know how to determine endian-ness on this machine!"
.endif
@@ -48,10 +56,9 @@ BROKEN_i386= error: "don't know how to determine endian-ness on this machine!"
post-install:
@${STRIP_CMD} \
${STAGEDIR}${PYTHON_SITELIBDIR}/cocotb/simulator${PYTHON_TAG}.so \
- ${STAGEDIR}${PYTHON_SITELIBDIR}/cocotb/libs/lib*.so \
- ${STAGEDIR}${PYTHON_SITELIBDIR}/cocotb/libs/libcocotbvpi_icarus.vpl
+ ${STAGEDIR}${PYTHON_SITELIBDIR}/cocotb/libs/lib*.so
-do-test: # some tests fail, see https://github.com/cocotb/cocotb/issues/3236, https://github.com/cocotb/cocotb/issues/3435
+do-test: # almost all or all tests pass, they don't print summary in the end
@cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${GMAKE} test
.include <bsd.port.post.mk>
diff --git a/cad/py-cocotb/distinfo b/cad/py-cocotb/distinfo
index ca30f597c35c..5708613f0da4 100644
--- a/cad/py-cocotb/distinfo
+++ b/cad/py-cocotb/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1774475217
-SHA256 (cocotb-cocotb-v2.0.1_GH0.tar.gz) = 4a45c47932d66bf231ad56b64a5682dccaa5bc199a5fd371da2953f7bf6934d3
-SIZE (cocotb-cocotb-v2.0.1_GH0.tar.gz) = 739173
+TIMESTAMP = 1789146717
+SHA256 (cocotb-cocotb-v2.1.0_GH0.tar.gz) = 29b4c6244a1b3991fc2e9ea9faf8823f67549ca40c3b260a44aa752f7a79ffe6
+SIZE (cocotb-cocotb-v2.1.0_GH0.tar.gz) = 1174279
diff --git a/cad/py-cocotb/files/patch-.git_archival.txt b/cad/py-cocotb/files/patch-.git_archival.txt
new file mode 100644
index 000000000000..f581456f5f8f
--- /dev/null
+++ b/cad/py-cocotb/files/patch-.git_archival.txt
@@ -0,0 +1,13 @@
+-- Fix describe-name format for setuptools-git-versioning 3.x.
+-- GitHub archives use %D format (ref-names like "tag: v2.1.0") instead of
+-- the git-describe format (v2.1.0) that setuptools-git-versioning expects.
+
+--- .git_archival.txt.orig
++++ .git_archival.txt
+@@ -1,4 +1,4 @@
+ node: e85fae957d5c93894740b164ea9cc6567015b954
+ node-date: 2026-08-30T22:23:52+02:00
+-describe-name: tag: v2.1.0
+-ref-names: tag: v2.1.0
++describe-name: v2.1.0
++ref-names: tag: v2.1.0
diff --git a/cad/py-cocotb/files/patch-pyproject.toml b/cad/py-cocotb/files/patch-pyproject.toml
new file mode 100644
index 000000000000..76acb248596a
--- /dev/null
+++ b/cad/py-cocotb/files/patch-pyproject.toml
@@ -0,0 +1,35 @@
+-- Fix pyproject.toml for FreeBSD ports:
+-- 1. Lower setuptools requirement to match port version (63.1.0)
+-- 2. Fix PEP 639 license format (requires setuptools >= 77)
+-- 3. Remove setuptools-git-versioning (fails with GitHub archives)
+-- 4. Use static version string
+--- pyproject.toml.orig 2026-09-11 10:19:37.146879000 -0700
++++ pyproject.toml 2026-09-11 10:19:37.200787000 -0700
+@@ -1,15 +1,12 @@
+ [build-system]
+-requires = ["setuptools>=77,<84", "wheel", "setuptools-git-versioning>=3.0,<4"]
++requires = ["setuptools>=63", "wheel"]
+ build-backend = "setuptools.build_meta"
+
+ [project]
+ name = "cocotb"
+ description = "Python-based chip (RTL) verification"
+ readme = "README.md"
+-license = "BSD-3-Clause"
+-license-files = [
+- "LICENSE"
+-]
++license = { text = "BSD-3-Clause" }
+ authors = [
+ {name = "Chris Higgs"},
+ {name = "Stuart Hodgson"},
+@@ -40,7 +37,8 @@
+ "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
+ "Framework :: cocotb",
+ ]
+-dynamic = ["version"]
++version = "2.1.0"
++dynamic = []
+
+ [project.scripts]
+ cocotb-config = "cocotb_tools.config:main"