Skip to content

Commit b2fa16c

Browse files
authored
Prefer octave-cli if available (#236)
* Prefer octave-cli if available * try system octave * use sudo
1 parent 31238ac commit b2fa16c

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
python-version: [3.7, 3.8, 3.9, '3.10']
22+
python-version: [3.8, 3.9, '3.10', '3.11']
2323

2424
steps:
2525
- uses: actions/checkout@v2
2626
- name: Base Setup
2727
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
28-
- name: Setup conda ${{ matrix.python-version }}
29-
uses: conda-incubator/setup-miniconda@v2
30-
with:
31-
auto-update-conda: true
32-
miniforge-variant: Mambaforge
33-
python-version: ${{ matrix.python-version }}
28+
- name: Install octave
29+
run: |
30+
sudo apt-get install -y octave
3431
- name: Install dependencies
3532
run: |
36-
conda install -y octave
3733
make install
3834
make docker-build
3935
- name: Run test

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ To install using conda::
2222
conda install octave_kernel
2323
conda install texinfo # For the inline documentation (shift-tab) to appear.
2424

25-
We require the ``octave`` executable to run the kernel.
25+
We require the ``octave-cli`` or ``octave`` executable to run the kernel.
2626
Add that executable's directory to the ``PATH`` environment variable or create the
2727
environment variable ``OCTAVE_EXECUTABLE`` to point to the executable itself.
28-
Note that on Octave 5 on Windows, the executable is in ``"Octave-5.x.x.x\mingw64\bin"``.
28+
Note that on Octave 5+ on Windows, the executable is in ``"Octave-x.x.x.x\mingw64\bin"``.
2929

3030
We automatically install a Jupyter kernelspec when installing the
3131
python package. This location can be found using ``jupyter kernelspec list``.

octave_kernel/kernel.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,11 @@ def _get_executable(self):
481481
if 'octave' not in executable:
482482
raise OSError('OCTAVE_EXECUTABLE does not point to an octave file, please see README')
483483
else:
484-
executable = which('octave')
484+
executable = which('octave-cli')
485485
if not executable:
486-
raise OSError('octave not found, please see README')
486+
executable = which('octave')
487+
if not executable:
488+
raise OSError('octave not found, please see README')
487489
return executable.replace(os.path.sep, '/')
488490

489491
def _cleanup(self):

0 commit comments

Comments
 (0)