[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PKG_ADD and package loading state when called
From: |
Andrew Janke |
Subject: |
PKG_ADD and package loading state when called |
Date: |
Fri, 18 Jan 2019 15:21:59 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi, Octave maintainers,
I'm working on adding a PKG_ADD file to one of my packages.
I notice that when the PKG_ADD file is called, the architecture-specific
directory of the package has been added to the Octave path, but the main
package directory has not. So PKG_ADD can't call any non-octfile
functions in the package. Is this expected?
I'm doing the detection by putting this in my PKG_ADD:
disp('Adding chrono package');
fprintf('pwd = %s\n', pwd);
disp('pkg list:')
pkg list
disp('Path:')
path
And my results:
octave:7> pkg load chrono
Adding chrono package
pwd = /Users/janke
pkg list:
Package Name | Version | Installation directory
---------------+---------+-----------------------
chrono *| 0.1.0 | /Users/janke/octave/chrono-0.1.0
generate_html | 0.3.1 | /Users/janke/octave/generate_html-0.3.1
Path:
Octave's search path contains the following directories:
/Users/janke/octave/chrono-0.1.0/x86_64-apple-darwin17.7.0-api-v52
.
/Users/janke/Dropbox/computer/data/Documents/octave
/usr/local/Cellar/octave/4.4.1_5/share/octave/site/m
/usr/local/Cellar/octave/4.4.1_5/share/octave/site/m/startup
/usr/local/Cellar/octave/4.4.1_5/lib/octave/4.4.1/oct/x86_64-apple-darwin17.7.0
/usr/local/Cellar/octave/4.4.1_5/share/octave/4.4.1/m
[...]
After the package is loaded, both dirs are on the path:
octave:8> path
Octave's search path contains the following directories:
.
/Users/janke/octave/chrono-0.1.0
/Users/janke/octave/chrono-0.1.0/x86_64-apple-darwin17.7.0-api-v52
/Users/janke/Dropbox/computer/data/Documents/octave
/usr/local/Cellar/octave/4.4.1_5/share/octave/site/m
[...]
The documentation for PKG_ADD doesn't specify what the package loading
state will be when PKG_ADD and PKG_DEL are called.
https://octave.org/doc/v4.4.1/Creating-Packages.html#Creating-Packages.
Could that be added?
This is on Octave 4.4.1 on macOS 10.13.6.
Cheers,
Andrew
- PKG_ADD and package loading state when called,
Andrew Janke <=