Date: Thu, 06 Aug 2026 06:04:11 +0000 From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 7f2d6d1490e7 - 2026Q3 - math/py-pynleq2: update 0=?utf-8?Q?=2E0.2 =E2=86=92?= 0.1.0 Message-ID: <6a7423db.25ba1.1b3772cd@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch 2026Q3 has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=7f2d6d1490e77a7a139fa0a66a7bbfcafc7ac336 commit 7f2d6d1490e77a7a139fa0a66a7bbfcafc7ac336 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2026-08-05 18:32:01 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2026-08-06 06:04:07 +0000 math/py-pynleq2: update 0.0.2 → 0.1.0 (cherry picked from commit 8cfb674676ceb7a990d71c0997c73e32ad784831) --- math/py-pynleq2/Makefile | 27 +++++----- math/py-pynleq2/distinfo | 6 +-- math/py-pynleq2/files/patch-setup.cfg | 8 +++ math/py-pynleq2/files/patch-setup.py | 95 +++++++++++++++++++++++++++-------- 4 files changed, 99 insertions(+), 37 deletions(-) diff --git a/math/py-pynleq2/Makefile b/math/py-pynleq2/Makefile index d079b82c3f26..689c16128ad4 100644 --- a/math/py-pynleq2/Makefile +++ b/math/py-pynleq2/Makefile @@ -1,6 +1,5 @@ PORTNAME= pynleq2 -DISTVERSION= 0.0.2 -PORTREVISION= 10 +DISTVERSION= 0.1.0 CATEGORIES= math python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -13,25 +12,29 @@ WWW= https://github.com/bjodah/pynleq2 LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + meson:devel/meson@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} USES= fortran python -USE_PYTHON= distutils autoplist +USE_PYTHON= distutils autoplist pytest USE_GITHUB= nodefault GH_TUPLE= PySCeS:pysces:0.9.8:fortran FORTRAN_FILES= linalg_nleq2.f nleq2.f wnorm.f zibconst.f zibmon.f zibsec.f -post-patch: - @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/setup.py - -pre-build: # compile fortran files into a static library because distutils fails while doing this - @${MKDIR} ${WRKDIR}/.fbuild && \ - cd ${WRKDIR}/.fbuild && \ - ${FC} -c ${CFLAGS} -fPIC ${FORTRAN_FILES:C,^,${WRKSRC_fortran}/pysces/nleq2/,} && \ - ${AR} -qc libff.a ${FORTRAN_FILES:S/.f/.o/} +pre-build: # copy fortran sources and build the extension with f2py + @${CP} ${FORTRAN_FILES:C,^,${WRKSRC_fortran}/pysces/nleq2/,} ${WRKSRC}/nleq2/ + @cd ${WRKSRC}/nleq2 && \ + ${SETENV} FC=${FC} F77=${F77} F90=${F90} FFLAGS="${FFLAGS}" \ + LDFLAGS="${LDFLAGS}" ${PYTHON_CMD} -m numpy.f2py -c -m nleq2 \ + nleq2.pyf ${FORTRAN_FILES} -lexecinfo + @${MV} ${WRKSRC}/nleq2/nleq2*.so ${WRKSRC}/pynleq2/ post-install: @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/nleq2*.so +# tests as of 0.1.0: 1 passed + .include <bsd.port.mk> diff --git a/math/py-pynleq2/distinfo b/math/py-pynleq2/distinfo index 838ddb07e02b..16b715234447 100644 --- a/math/py-pynleq2/distinfo +++ b/math/py-pynleq2/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1589502332 -SHA256 (pynleq2-0.0.2.tar.gz) = b9be75bb7def34cd7a82aed87b70f6c3c9f4602cbe9e8d4fcf43a4aae241112d -SIZE (pynleq2-0.0.2.tar.gz) = 6219 +TIMESTAMP = 1785952531 +SHA256 (pynleq2-0.1.0.tar.gz) = e26343e0631ea9b0d56a023de27468b72baadad3aab194942ffa590620029b0d +SIZE (pynleq2-0.1.0.tar.gz) = 6466 SHA256 (PySCeS-pysces-0.9.8_GH0.tar.gz) = a97af5afe50fe994e84d33455ded5821f694d809f6a36adc9b486bb209d58a72 SIZE (PySCeS-pysces-0.9.8_GH0.tar.gz) = 2655864 diff --git a/math/py-pynleq2/files/patch-setup.cfg b/math/py-pynleq2/files/patch-setup.cfg new file mode 100644 index 000000000000..91070375a462 --- /dev/null +++ b/math/py-pynleq2/files/patch-setup.cfg @@ -0,0 +1,8 @@ +--- setup.cfg.orig 2018-08-30 00:00:00 UTC ++++ setup.cfg +@@ -1,4 +1,4 @@ +-[pytest] ++[tool:pytest] + norecursedirs = .git .cache scripts build dist conda-recipe doc deploy + #pep8maxlinelength=119 + pep8ignore = diff --git a/math/py-pynleq2/files/patch-setup.py b/math/py-pynleq2/files/patch-setup.py index c8e27f0124a8..3a5b8cfec4a8 100644 --- a/math/py-pynleq2/files/patch-setup.py +++ b/math/py-pynleq2/files/patch-setup.py @@ -1,27 +1,78 @@ ---- setup.py.orig 2015-10-20 14:54:08 UTC +--- setup.py.orig 2018-04-02 00:00:00 UTC +++ setup.py -@@ -75,19 +75,21 @@ if len(sys.argv) > 1 and '--help' not in - - for src, md5sum in zip(sources, md5sums): - srcpath = os.path.join('nleq2', src) +@@ -39,6 +39,8 @@ + import sys + import warnings + ++from setuptools import setup ++ + pkg_name = 'pynleq2' + ext_modules = [] + +@@ -46,56 +48,9 @@ + def _path_under_setup(*args): + return os.path.join(os.path.dirname(__file__), *args) + +-if len(sys.argv) > 1 and '--help' not in sys.argv[1:] and sys.argv[1] not in ( +- '--help-commands', 'egg_info', 'clean', '--version'): +- from numpy.distutils.core import Extension, setup +- # nleq2 version: 2.3.0.2 +- md5output = """\ +- 1cd2f30a38e255d394685075e921de4a linalg_nleq2.f +- 8a94b6c440d068f075abecbde495a8e1 nleq2.f +- 77189300200be5748152fa28dc236963 wnorm.f +- 5d912441fb6f55d10c8b98bbb9168195 zibconst.f +- e2ac1a20fc6294cb3e0d7f65bbac53e6 zibmon.f +- 6520c958f2bd339b435a68541d5b910b zibsec.f +- """ +- from textwrap import dedent +- md5sums, sources = zip(*map(str.split, dedent(md5output)[:-1].split('\n'))) +- +- def md5_of_file(path, nblocks=128): +- from hashlib import md5 +- md = md5() +- with open(path, 'rb') as f: +- for chunk in iter(lambda: f.read(nblocks*md.block_size), b''): +- md.update(chunk) +- return md +- +- def download(url, outpath): +- try: +- from urllib2 import urlopen +- except ImportError: +- from urllib.request import urlopen +- f = urlopen(url) +- with open(outpath, "wb") as fh: +- fh.write(f.read()) +- +- NLEQ2_URL = os.environ.get('PYNLEQ2_NLEQ2_ROOT_URL', None) +- +- for src, md5sum in zip(sources, md5sums): +- srcpath = _path_under_setup('nleq2', src) - if not os.path.exists(srcpath): -+ if False and not os.path.exists(srcpath): - NLEQ2_URL = os.environ.get('PYNLEQ2_NLEQ2_ROOT_URL', None) - if NLEQ2_URL: - download(NLEQ2_URL+src, srcpath) - else: - fmtstr = "Could not find: %s ($PYNLEQ2_NLEQ2_ROOT_URL not set)" - raise ValueError(fmtstr % src) +- if NLEQ2_URL: +- download(NLEQ2_URL+src, srcpath) +- else: +- fmtstr = "Could not find: %s ($PYNLEQ2_NLEQ2_ROOT_URL not set)" +- raise ValueError(fmtstr % src) - if md5_of_file(srcpath).hexdigest() != md5sum: -+ if False and md5_of_file(srcpath).hexdigest() != md5sum: - raise ValueError("Mismatching MD5 sum for %s" % srcpath) - - ext_modules = [ - Extension('pynleq2.nleq2', [os.path.join('nleq2', f) +- warnings.warn("Unexpected MD5 sum for %s" % srcpath) +- +- ext_modules = [ +- Extension('pynleq2.nleq2', [_path_under_setup('nleq2', f) - for f in ('nleq2.pyf',) + sources]) -+ for f in ('nleq2.pyf',)] -+ , libraries=['ff', 'execinfo'] -+ , library_dirs=['../.fbuild']) - ] - +- ] ++# The extension module pynleq2/nleq2*.so is pre-built by the port in ++# pre-build using f2py, so no extension is built by setup.py. + PYNLEQ2_RELEASE_VERSION = os.environ.get('PYNLEQ2_RELEASE_VERSION', '') + + # http://conda.pydata.org/docs/build.html#environment-variables-set-during-the-build-process +@@ -144,6 +99,7 @@ + license='BSD', + requires=['numpy'], + packages=[pkg_name] + tests, ++ package_data={pkg_name: ['nleq2*.so']}, + ext_modules=ext_modules, + zip_safe=False, # https://github.com/pytest-dev/pytest/issues/1445 + )home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a7423db.25ba1.1b3772cd>
