Bug 250884 - math/cantor: Support ptyhon3.9 instead of duplicating python 3.6 check
Summary: math/cantor: Support ptyhon3.9 instead of duplicating python 3.6 check
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-05 17:42 UTC by Oleg Sidorkin
Modified: 2020-11-06 04:45 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments
svn diff to fix python3.9 detection in math/cantor (615 bytes, patch)
2020-11-05 17:42 UTC, Oleg Sidorkin
no flags Details | Diff
v2 (1.88 KB, patch)
2020-11-05 18:05 UTC, Tobias C. Berner
no flags Details | Diff
v3 (2.14 KB, patch)
2020-11-05 18:26 UTC, Tobias C. Berner
no flags Details | Diff
v4 (2.52 KB, patch)
2020-11-05 18:38 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sidorkin 2020-11-05 17:42:39 UTC
Created attachment 219373 [details]
svn diff to fix python3.9 detection in math/cantor

Cantor upstream is checking for python3.6 itself now, however it is missing python3.9 check. So if DEFAULT_VERSIONS+=python3=3.9 is set and earlier version of python is not installed math/cantor fails to detect python. Then it fails to install because of missing files listed in pkg-plist.

In the proposed patch REINPLACE_CMD args are ajusted to add python3.9 support (and stop duplicating python3.6 entry)
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 17:58:02 UTC
Moin moin 

Yes, I looked at patching it similarly recently. I think it would be preferable however, if we added a %%PYTHON%% as first entry in the cmake and replace that with the version used by the framework, which should make it a bit more robust and future proof.


mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 18:05:21 UTC
Created attachment 219374 [details]
v2

Could you try this one?
Comment 3 Oleg Sidorkin 2020-11-05 18:22:30 UTC
(In reply to Tobias C. Berner from comment #2)
(had to apply in manually)
Cantor fails to install with this patch for me.

I think it's because of missing
"-e '/pkg_check_modules/s,python3,python-${PYTHON_VER},' \"
part. If I add this part to the Makefile, cantor installs ok.
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 18:26:25 UTC
Created attachment 219375 [details]
v3
Comment 5 Oleg Sidorkin 2020-11-05 18:37:14 UTC
(In reply to Tobias C. Berner from comment #4)

This gives us
"pkg_check_modules(PYTHONLIBS3 QUIET python3.9)"
instead of
"pkg_check_modules(PYTHONLIBS3 QUIET python-3.9)"
Comment 6 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 18:38:54 UTC
Created attachment 219377 [details]
v4

I think we're getting there :D
Comment 7 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 18:39:35 UTC
(In reply to Tobias C. Berner from comment #6)
(obvisouly ignore the python:3.9+ hunk :) -- but at least now you know I tested this one :D )
Comment 8 Oleg Sidorkin 2020-11-05 18:46:50 UTC
(In reply to Tobias C. Berner from comment #6)
Yes. It works now. :) Thanks a lot for looking on it.
Comment 9 commit-hook freebsd_committer freebsd_triage 2020-11-05 18:49:20 UTC
A commit references this bug:

Author: tcberner
Date: Thu Nov  5 18:49:12 UTC 2020
New revision: 554148
URL: https://svnweb.freebsd.org/changeset/ports/554148

Log:
  math/cantor: Support ptyhon3.9

  - instead of adding 'python3.9' to the list, simply patch in
    python-${PYTHON_VER} -- this way, this should fix two issues

    1) make it work with python
    2) help cmake find the "wanted" python version in unclean environments

  PR:		250884
  Reported by:	Oleg Sidorkin <osidorkin@gmail.com>, fluffy (previously)

Changes:
  head/math/cantor/Makefile
  head/math/cantor/files/
  head/math/cantor/files/patch-cmake_FindPythonLibs3.cmake
Comment 10 Tobias C. Berner freebsd_committer freebsd_triage 2020-11-05 18:50:29 UTC
Thanks for testing :)
Comment 11 commit-hook freebsd_committer freebsd_triage 2020-11-06 04:45:36 UTC
A commit references this bug:

Author: tcberner
Date: Fri Nov  6 04:45:21 UTC 2020
New revision: 554167
URL: https://svnweb.freebsd.org/changeset/ports/554167

Log:
  MFH: r554148

  math/cantor: Support ptyhon3.9

  - instead of adding 'python3.9' to the list, simply patch in
    python-${PYTHON_VER} -- this way, this should fix two issues

    1) make it work with python
    2) help cmake find the "wanted" python version in unclean environments

  PR:		250884
  Reported by:	Oleg Sidorkin <osidorkin@gmail.com>, fluffy (previously)

  Approved by:	ports-secteam (implicit)

Changes:
_U  branches/2020Q4/
  branches/2020Q4/math/cantor/Makefile
  branches/2020Q4/math/cantor/files/