From nobody Wed Oct 15 05:25:43 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmfgX2F4Lz6CkKL; Wed, 15 Oct 2025 05:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmfgX1c0Jz3G1w; Wed, 15 Oct 2025 05:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760505944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHKtTeQPLNvlKFrmxloeJOuN/jI2Ha9oIcVnHi5IGl8=; b=QEpd0isYcG32PbppkrfGkp+cHCqSUx17djmBU/0wWKsuoUE94E2iayMRNdPYioWQ3CRcro naFE2tromoYjIFSxb4PEOZUM4+U6/QENkza1yFFyCMNMxJnL3wo96VBOb89c21IyiK7GN4 0P5vxoD176NNCilHmrCSzusHSWhar5pnrpE/QoF1etrIui1TfBnYmRn4P+DMwpn1ApCTBf bjI1yG6uMdXKBZpmXl5PQ23xHgbGekrRtDiKaAQxlj7s85ySQFjWz6KStOE4v4XSItBUfs mQDQMGusWe8kmaMhy+/0J8p9mdRJDifcXdv3mFZHL5sYJPZcphq6VRg246mFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760505944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hHKtTeQPLNvlKFrmxloeJOuN/jI2Ha9oIcVnHi5IGl8=; b=AzEZNht85gxCMHFXB3vDr7Lka5mpHbmlPOgNspnk81Sz6tNAZNPeJL00h7a1aNkUEfMSiu f40LnldTZtaHBLI2qlgul86ElQ1ZeHTeaChzt8EGYvFN2kBhQaOsf4W1A8TKsdyaOhI6gK nLH1OjIy7Mpf7mZF131u3l+VcPB3Y9tymNMTUZQ72HgPsbzS79DFg8iYF4HBmZWSAjJ433 92b67hBISYHQUlwmJhrXe1lNNVT6YYxoKEpNKe866Z9olEw+nN1LhVn5X3ICH0BcerT2/o /vVeFTdgMn7/Xn5MqnAQpLHYNCIR3sndeU5MN4q1HcYteb/TriiMJOq/dHBsmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760505944; a=rsa-sha256; cv=none; b=jJSY2S8fzo1SFkJQq9U3j+89XLZris/Hd6bmms4tAgHonMxlXBJblJCSV7Wk4g/toviM/p bp3e3nrsouu1q7MEb9RQG7/FY4HJnKp7CnTiPRs2zoiRsxGImvMM6S4VedafTbt+B1HUtB SKcSkXSJtbNAaASkiswPoUPx2FCTpp7yx0b/nQE5yrkIpBY6HvS0BqZ12+6yHU2H0NAVtQ Piaxen+dAi5TUCJoDmwTlB1xzvaHoMMwhekNYDg5BWAd/vTjVSDujRt0bX+GP00R+zn7zn 35Isgd/gUScO01472UFCW0xC46oD8IpAJqWn65vzJWPDO42W+wqBEDVrCf955A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmfgX0wW1z8NP; Wed, 15 Oct 2025 05:25:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59F5PhAW046171; Wed, 15 Oct 2025 05:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59F5Ph5A046168; Wed, 15 Oct 2025 05:25:43 GMT (envelope-from git) Date: Wed, 15 Oct 2025 05:25:43 GMT Message-Id: <202510150525.59F5Ph5A046168@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Xin LI Subject: git: 9fea2cd984a3 - main - math/py-numpy: Reland Migrate to PEP517 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9fea2cd984a308cc38ecc0cbc0f70178b9fa5e02 Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/ports/commit/?id=9fea2cd984a308cc38ecc0cbc0f70178b9fa5e02 commit 9fea2cd984a308cc38ecc0cbc0f70178b9fa5e02 Author: Matthew Wener AuthorDate: 2025-10-15 05:10:50 +0000 Commit: Xin LI CommitDate: 2025-10-15 05:10:50 +0000 math/py-numpy: Reland Migrate to PEP517 This restores 3f582fcf38bb0cee40f9346683490aceb3bda654 but with allflavors removed. PR: ports/287794 --- math/py-numpy/Makefile | 12 ++++++++--- math/py-numpy/files/patch-numpy_core_setup.py | 19 ++++++++++++++++++ .../patch-numpy_distutils_mingw32ccompiler.py | 17 ++++++++++++++++ math/py-numpy/files/patch-numpy_random_setup.py | 23 ++++++++++++++++++++++ math/py-numpy/files/patch-pyproject.toml | 11 +++++++++++ 5 files changed, 79 insertions(+), 3 deletions(-) diff --git a/math/py-numpy/Makefile b/math/py-numpy/Makefile index 22f8b33f9ed3..7b7273abe5be 100644 --- a/math/py-numpy/Makefile +++ b/math/py-numpy/Makefile @@ -1,6 +1,6 @@ PORTNAME= numpy PORTVERSION= 1.26.4 -PORTREVISION= 9 +PORTREVISION= 10 PORTEPOCH= 1 CATEGORIES= math python MASTER_SITES= PYPI \ @@ -18,12 +18,14 @@ WWW= https://www.numpy.org/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE.txt +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}meson-python>=0:devel/meson-python@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>=6.24.1:devel/py-hypothesis@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pytest>=6.2.5:devel/py-pytest@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.2.0:devel/py-typing-extensions@${PY_FLAVOR} -USES= compiler:c11 cpe fortran python:3.9+ -USE_PYTHON= allflavors autoplist concurrent cython distutils +USES= compiler:c11 cpe fortran pkgconfig python:3.9+ shebangfix +USE_PYTHON= autoplist concurrent cython pep517 GCCLIBDIR_CMDS= ${FC} -print-file-name=libgfortran.so | ${SED} -e \ s/libgfortran.so// @@ -61,6 +63,10 @@ OPENBLAS_VARS= BLASLIBS="openblas, gfortran" \ LIBRARIES=libraries SUITESPARSE_LIB_DEPENDS= libumfpack.so:math/suitesparse-umfpack +SHEBANG_FILES= numpy/f2py/crackfortran.py numpy/f2py/f2py2e.py \ + numpy/f2py/rules.py numpy/testing/print_coercion_tables.py \ + numpy/testing/setup.py + post-extract: @${TOUCH} ${WRKSRC}/numpy/f2py/tests/src/temp @${TOUCH} ${WRKSRC}/numpy/random/_examples/temp diff --git a/math/py-numpy/files/patch-numpy_core_setup.py b/math/py-numpy/files/patch-numpy_core_setup.py new file mode 100644 index 000000000000..7502a4df93fb --- /dev/null +++ b/math/py-numpy/files/patch-numpy_core_setup.py @@ -0,0 +1,19 @@ +--- numpy/core/setup.py.orig 2024-02-05 21:17:48 UTC ++++ numpy/core/setup.py +@@ -9,7 +9,6 @@ from numpy.distutils import log + from os.path import join + + from numpy.distutils import log +-from numpy.distutils.msvccompiler import lib_opts_if_msvc + from distutils.dep_util import newer + from sysconfig import get_config_var + from numpy.compat import npy_load_module +@@ -688,7 +687,7 @@ def configuration(parent_package='',top_path=None): + install_dir='lib', + build_info={ + 'include_dirs' : [], # empty list required for creating npy_math_internal.h +- 'extra_compiler_args': [lib_opts_if_msvc], ++ 'extra_compiler_args': [], + }) + config.add_npy_pkg_config("npymath.ini.in", "lib/npy-pkg-config", + subst_dict) diff --git a/math/py-numpy/files/patch-numpy_distutils_mingw32ccompiler.py b/math/py-numpy/files/patch-numpy_distutils_mingw32ccompiler.py new file mode 100644 index 000000000000..a7466a818792 --- /dev/null +++ b/math/py-numpy/files/patch-numpy_distutils_mingw32ccompiler.py @@ -0,0 +1,17 @@ +--- numpy/distutils/mingw32ccompiler.py.orig 2024-02-05 21:17:48 UTC ++++ numpy/distutils/mingw32ccompiler.py +@@ -24,7 +24,13 @@ from distutils.unixccompiler import UnixCCompiler + + import distutils.cygwinccompiler + from distutils.unixccompiler import UnixCCompiler +-from distutils.msvccompiler import get_build_version as get_build_msvc_version ++ ++try: ++ from distutils.msvccompiler import get_build_version as get_build_msvc_version ++except ImportError: ++ def get_build_msvc_version(): ++ return None ++ + from distutils.errors import UnknownFileError + from numpy.distutils.misc_util import (msvc_runtime_library, + msvc_runtime_version, diff --git a/math/py-numpy/files/patch-numpy_random_setup.py b/math/py-numpy/files/patch-numpy_random_setup.py new file mode 100644 index 000000000000..74ff5ffc8e54 --- /dev/null +++ b/math/py-numpy/files/patch-numpy_random_setup.py @@ -0,0 +1,23 @@ +--- numpy/random/setup.py.orig 2024-02-05 21:17:48 UTC ++++ numpy/random/setup.py +@@ -3,7 +3,6 @@ from numpy.distutils.system_info import platform_bits + from os.path import join + + from numpy.distutils.system_info import platform_bits +-from numpy.distutils.msvccompiler import lib_opts_if_msvc + + + def configuration(parent_package='', top_path=None): +@@ -70,11 +69,7 @@ def configuration(parent_package='', top_path=None): + not initialized the distutils build command, so use this deferred + calculation to run when we are building the library. + """ +- opts = lib_opts_if_msvc(build_cmd) +- if build_cmd.compiler.compiler_type != 'msvc': +- # Some bit generators require c99 +- opts.append('-std=c99') +- return opts ++ return ['-std=c99'] + + config.add_installed_library('npyrandom', + sources=npyrandom_sources, diff --git a/math/py-numpy/files/patch-pyproject.toml b/math/py-numpy/files/patch-pyproject.toml new file mode 100644 index 000000000000..3eb3c97a8da5 --- /dev/null +++ b/math/py-numpy/files/patch-pyproject.toml @@ -0,0 +1,11 @@ +--- pyproject.toml.orig 2025-06-24 22:40:55 UTC ++++ pyproject.toml +@@ -2,7 +2,7 @@ requires = [ + build-backend = "mesonpy" + requires = [ + "Cython>=0.29.34,<3.1", +- "meson-python>=0.15.0,<0.16.0", ++ "meson-python>=0.15.0", + ] + + [project]