Bug 287794

Summary: math/py-numpy: Migrate to PEP517
Product: Ports & Packages Reporter: Matthew Wener <matthew>
Component: Individual Port(s)Assignee: Xin LI <delphij>
Status: Closed FIXED    
Severity: Affects Some People CC: delphij, jcfyecrayz, michaelo, ohartmann, python, rhurlin
Priority: --- Flags: bugzilla: maintainer-feedback? (python)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 285957    
Attachments:
Description Flags
patch to build on pep517
none
Proposed patch v2
delphij: maintainer-approval? (python)
Proposed patch v3 matthew: maintainer-approval? (python)

Description Matthew Wener 2025-06-25 00:59:12 UTC
Fixes the build issues on PY312 where I am getting ModuleNotFoundError: No module named 'distutils'
Comment 1 Matthew Wener 2025-06-25 01:00:53 UTC
Created attachment 261580 [details]
patch to build on pep517
Comment 2 Xin LI freebsd_committer freebsd_triage 2025-07-05 01:46:10 UTC
Created attachment 261877 [details]
Proposed patch v2

In addition to migrating numpy itself to PEP517, also short circuit MSVC related distutil legacy code to allow dependencies that has not yet moved to build with newer setuptools.
Comment 3 Matthew Wener 2025-10-11 18:08:32 UTC
Created attachment 264489 [details]
Proposed patch v3

Rebased the patch to September 10, 2025 changes
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-10-13 06:38:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3f582fcf38bb0cee40f9346683490aceb3bda654

commit 3f582fcf38bb0cee40f9346683490aceb3bda654
Author:     Matthew Wener <matthew@wener.org>
AuthorDate: 2025-10-11 17:57:18 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2025-10-13 06:36:40 +0000

    math/py-numpy: Migrate to PEP517

    PR:     ports/287794

 math/py-numpy/Makefile                             | 12 ++++++++---
 .../py-numpy/files/patch-numpy_core_setup.py (new) | 19 ++++++++++++++++++
 ...patch-numpy_distutils_mingw32ccompiler.py (new) | 17 ++++++++++++++++
 .../files/patch-numpy_random_setup.py (new)        | 23 ++++++++++++++++++++++
 math/py-numpy/files/patch-pyproject.toml (new)     | 11 +++++++++++
 5 files changed, 79 insertions(+), 3 deletions(-)
Comment 5 Xin LI freebsd_committer freebsd_triage 2025-10-13 06:38:43 UTC
Committed, thanks!
Comment 6 Xin LI freebsd_committer freebsd_triage 2025-10-13 06:59:11 UTC
*** Bug 287380 has been marked as a duplicate of this bug. ***
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-10-15 05:25:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9fea2cd984a308cc38ecc0cbc0f70178b9fa5e02

commit 9fea2cd984a308cc38ecc0cbc0f70178b9fa5e02
Author:     Matthew Wener <matthew@wener.org>
AuthorDate: 2025-10-15 05:10:50 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
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 ++++++++---
 .../py-numpy/files/patch-numpy_core_setup.py (new) | 19 ++++++++++++++++++
 ...patch-numpy_distutils_mingw32ccompiler.py (new) | 17 ++++++++++++++++
 .../files/patch-numpy_random_setup.py (new)        | 23 ++++++++++++++++++++++
 math/py-numpy/files/patch-pyproject.toml (new)     | 11 +++++++++++
 5 files changed, 79 insertions(+), 3 deletions(-)