bugGNU Octave - Bugs: bug #62733, python.m feature needs more...

 
 

bug #62733: python.m feature needs more sophisticated search for python executable

Submitter:  Colin Macdonald <cbm>
Submitted:  Sat 09 Jul 2022 04:58:38 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 11 Jul 2022 01:41:18 AM UTC, comment #6: 

Thank.  I committed the changeset here http://hg.savannah.gnu.org/hgweb/octave/rev/22305b923761

Rik <rik5>
Group administrator
Sun 10 Jul 2022 05:35:21 AM UTC, comment #5: 

Ok, thanks for the encouragement, I redid as a proper hg commit.

Its the one called "62733_python_docs.patch"

(file #53410)

Colin Macdonald <cbm>
Sat 09 Jul 2022 11:39:44 PM UTC, comment #4: 

Sure, documentation improvement is welcome.  See https://wiki.octave.org/Contribute and then the subsection on Mercurial for how to contribute a changeset.

Rik <rik5>
Group administrator
Sat 09 Jul 2022 11:27:50 PM UTC, comment #3: 

I can't remember how to submit patches properly using `hg` but I'll attach a `.patch` of my attempt at phrasing...

(file #53409)

Colin Macdonald <cbm>
Sat 09 Jul 2022 11:20:46 PM UTC, comment #2: 

IMHO, the docstring for `help python` should mention how to do `setenv PYTHON w:\tf\is\my\python.exe` or similar.  Else, how would anyone ever find that?

Suggest opening.

Colin Macdonald <cbm>
Sat 09 Jul 2022 05:24:43 PM UTC, comment #1: 

I checked in a changeset which ports the python executable detection logic from sympy to core Octave.  See http://hg.savannah.gnu.org/hgweb/octave/rev/6cfc7af8eacc.

I verified that I can now use python from within Octave.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Sat 09 Jul 2022 04:58:38 PM UTC, original submission:  

Currently it just calls "python", which is likely to not exist on many unix systems.

See: https://octave.discourse.group/t/configure-test-for-python-can-fail-but-with-little-apparent-harm/2978

where I said:

- - - -

Yeah that seems simplistic in the post-Python 2 reality...   In Symbolic we have this file: https://github.com/cbm755/octsympy/blob/main/inst/private/defaultpython.m which basically returns "python3" on unix and "python" on Windows.

We also support `PYTHON` environment variable, which takes precedence over that default.  This is done in https://github.com/cbm755/octsympy/blob/main/inst/sympref.m

Perhaps we should port some of that to core?

Colin Macdonald <cbm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53410:  62733_python_docs.patch added by cbm (1KiB - text/x-patch)
file #53409:  python_doc.patch added by cbm (869B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cbm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-07-10 cbm Attached File- Added 62733_python_docs.patch, #53410
    2022-07-09 cbm Attached File- Added python_doc.patch, #53409
    2022-07-09 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code