Bug 270103 - science/py-scipy allow to build with python 3.11
Summary: science/py-scipy allow to build with python 3.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on: 267362
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-11 07:29 UTC by Thomas Guymer
Modified: 2023-10-08 11:23 UTC (History)
3 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Guymer 2023-03-11 07:29:41 UTC
Hi,

Please could the Makefile be updated to allow the @py311 flavour? Currently Poudriere refuses to build it with the following error:

Finished science/py-scipy@py311 | py311-scipy-1.10.0: Ignored: FLAVOR is defined (to py311) while this port does not have FLAVORS

Thanks,

Tom
Comment 1 Thomas Guymer 2023-03-11 08:07:30 UTC
... perhaps it could be future proofed by using something like "USES= python:3.8+"?
Comment 2 Charlie Li freebsd_committer freebsd_triage 2023-03-11 16:14:33 UTC
I actually have an update locally that amongst other things removes the upper bound. Upstream runs CI with newer Python (including in-development 3.12) but specify their versions *very* conservatively, so some easy metadata patching is also needed.
Comment 3 Thomas Guymer 2023-03-12 10:58:36 UTC
The current FreeBSD ports version of SciPy is v1.10.0; the v1.10.0 release notes say "This release requires Python 3.8+ and NumPy 1.19.5 or greater", see https://docs.scipy.org/doc/scipy/release.1.10.0.html If the upper limit to the Python version was simply removed then that at least would make the port consistent with the SciPy release notes.
Comment 4 Charlie Li freebsd_committer freebsd_triage 2023-03-12 14:25:41 UTC
Right, however the Python package metadata specifies a lot of '==' that have to be patched out, else their build tooling errors out.
Comment 5 Thomas Guymer 2023-05-15 16:18:30 UTC
Hi,

Do you have an example of the kind of patching that would be required? Could this be done for Python 3.11 via a Pull Request on GitHub, or is the master FreeBSD Ports tree somewhere else? If it is an easy job then I could have a crack at it ... I really would like to use SciPy with Python 3.11 on FreeBSD.

Cheers,

Tom
Comment 6 Konstantin Belousov freebsd_committer freebsd_triage 2023-05-20 21:45:02 UTC
So meantime, can we enable scipy at least for 3.11?
There seems to be no reason to have this artificial limitation right now.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-05-27 23:56:45 UTC
A commit in branch main references this bug:

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

commit d3f88f868b7029a1d71b751f56650927c17b0090
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-05-27 23:27:35 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-05-27 23:44:42 +0000

    science/py-scipy: Relax USES=python

    PR:             270103
    Reference:      https://github.com/scipy/scipy/blob/v1.10.0/setup.py#L455

 science/py-scipy/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 8 Thomas Guymer 2023-05-29 09:58:15 UTC
Thank you for that commit sunpoet!

I can confirm that "poudriere" now builds "science/py-scipy" fine with Python 3.11, which allows "graphics/py-cartopy" to also be built with Python 3.11. I have run a few of my SciPy/Cartopy Python scripts today on my system and they all appear to be working just fine so far. Unless anyone has any objections, then I think that this ticket can be closed ...

Thank you very much!