aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2026-03-03 02:27:54 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2026-03-03 02:28:13 +0000
commit1fcc9a5b7458b76f4a968ca12fb43e39f5af406e (patch)
tree1f0a8809a21cfb23e9e65345a91566810c83e386
parent80018994a56b26897efd1e5b170ec91257caa434 (diff)
math/py-levmar: update 0.2.3 → 0.3.0.d0+g
-rw-r--r--math/py-levmar/Makefile34
-rw-r--r--math/py-levmar/distinfo6
-rw-r--r--math/py-levmar/files/patch-levmar___levmar.c22
-rw-r--r--math/py-levmar/files/patch-pyproject.toml12
4 files changed, 31 insertions, 43 deletions
diff --git a/math/py-levmar/Makefile b/math/py-levmar/Makefile
index 1638cd818723..1e5b93aaecf3 100644
--- a/math/py-levmar/Makefile
+++ b/math/py-levmar/Makefile
@@ -1,10 +1,8 @@
# levmar library (math/levmar) is bundled
PORTNAME= levmar
-DISTVERSION= 0.2.3
-PORTREVISION= 3
+DISTVERSION= 0.3.0.dev0+git # version is hardcoded in the project
CATEGORIES= math python
-MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
@@ -14,33 +12,33 @@ WWW= https://github.com/bjodah/levmar
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
-BROKEN= doesn't build with Python-3.11, 4 authors were notified via e-mail on 2024-06-02
-
-BUILD_DEPENDS= ${PYNUMPY}
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
LIB_DEPENDS= libblas.so:math/blas \
liblapack.so:math/lapack
TEST_DEPENDS= ${PYNUMPY}
USES= python
-USE_PYTHON= distutils autoplist
+USE_PYTHON= pep517 cython autoplist pytest
+
+USE_GITHUB= yes
+GH_ACCOUNT= bjodah
+GH_TAGNAME= 9291962
+
+TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ARGS= --pyargs levmar
+TEST_WRKSRC= ${WRKDIR}
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD
CFLAGS+= -Wno-error=int-conversion
-.endif
-
-.if ${OPSYS} == FreeBSD
CFLAGS+= -Wno-error=incompatible-function-pointer-types
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's|ö|o|' ${WRKSRC}/AUTHORS # breaks because of non-ascii chars
-
-post-install:
- @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/_${PORTNAME}*.so
-
-do-test:
- @cd ${WRKSRC}/levmar/tests && ${PYTHON_CMD} -m pytest --pyargs levmar
+# tests as of 0.3.0.dev0+git (9291962):
+# Results (0.22s):
+# 63 passed
.include <bsd.port.post.mk>
diff --git a/math/py-levmar/distinfo b/math/py-levmar/distinfo
index 0bdf312fe9d7..73d66da95efd 100644
--- a/math/py-levmar/distinfo
+++ b/math/py-levmar/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1571972494
-SHA256 (levmar-0.2.3.tar.gz) = fbdeaac4390e69121d4195bcafc815e7ba92bca06bcced769abeed37a13cd5c0
-SIZE (levmar-0.2.3.tar.gz) = 172794
+TIMESTAMP = 1772503647
+SHA256 (bjodah-levmar-0.3.0.dev0+git-9291962_GH0.tar.gz) = 436a45d3bb664c7bb5deec2fed0e97e99eefb1e2d03f0c3e22e28fbfdf5140ab
+SIZE (bjodah-levmar-0.3.0.dev0+git-9291962_GH0.tar.gz) = 99960
diff --git a/math/py-levmar/files/patch-levmar___levmar.c b/math/py-levmar/files/patch-levmar___levmar.c
deleted file mode 100644
index d895157ceb43..000000000000
--- a/math/py-levmar/files/patch-levmar___levmar.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- levmar/_levmar.c.orig 2019-10-23 16:15:35 UTC
-+++ levmar/_levmar.c
-@@ -15970,7 +15970,9 @@ static PyTypeObject __pyx_type_6levmar_7_levmar__LMFun
- sizeof(struct __pyx_obj_6levmar_7_levmar__LMFunc), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_6levmar_7_levmar__LMFunc, /*tp_dealloc*/
-+#if PY_VERSION_HEX < 0x03090000
- 0, /*tp_print*/
-+#endif
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
-@@ -17179,7 +17181,9 @@ static int __pyx_pymod_exec__levmar(PyObject *__pyx_py
- __pyx_vtable_6levmar_7_levmar__LMFunc.eval_func = (void (*)(struct __pyx_obj_6levmar_7_levmar__LMFunc *, double *, double *, int, int))__pyx_f_6levmar_7_levmar_7_LMFunc_eval_func;
- __pyx_vtable_6levmar_7_levmar__LMFunc.eval_jacf = (void (*)(struct __pyx_obj_6levmar_7_levmar__LMFunc *, double *, double *, int, int))__pyx_f_6levmar_7_levmar_7_LMFunc_eval_jacf;
- if (PyType_Ready(&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
-+#if PY_VERSION_HEX < 0x03090000
- __pyx_type_6levmar_7_levmar__LMFunc.tp_print = 0;
-+#endif
- if (__Pyx_SetVtable(__pyx_type_6levmar_7_levmar__LMFunc.tp_dict, __pyx_vtabptr_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
- if (PyObject_SetAttrString(__pyx_m, "_LMFunc", (PyObject *)&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6levmar_7_levmar__LMFunc) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
diff --git a/math/py-levmar/files/patch-pyproject.toml b/math/py-levmar/files/patch-pyproject.toml
new file mode 100644
index 000000000000..b8d42ed6fe42
--- /dev/null
+++ b/math/py-levmar/files/patch-pyproject.toml
@@ -0,0 +1,12 @@
+--- pyproject.toml.orig 2026-03-03 02:02:52 UTC
++++ pyproject.toml
+@@ -1,6 +1,6 @@ requires = [
+ [build-system]
+ requires = [
+- "setuptools==72.1.0", # ==72.1.0, see https://github.com/pypa/setuptools/issues/4748
++ "setuptools", # ==72.1.0, see https://github.com/pypa/setuptools/issues/4748
+ "numpy",
+ "cython",
+-]
+\ No newline at end of file
++]