[Pkg-octave-commit] [octave-symbolic] 01/03: Imported Upstream version 2.2.3
Rafael Laboissière
rlaboiss-guest at moszumanska.debian.org
Sun Nov 29 21:05:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
rlaboiss-guest pushed a commit to branch master
in repository octave-symbolic.
commit a48da3121fb9c9224a7daacbb42ff275b2166313
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date: Sun Nov 29 14:58:15 2015 -0200
Imported Upstream version 2.2.3
---
.travis.yml | 13 +++--
CONTRIBUTORS | 1 +
DESCRIPTION | 8 +--
NEWS | 20 +++++++
README.md | 5 ++
convert_comments.m | 40 ++++++-------
extract_tests_for_matlab.m | 2 +-
inst/@sym/cross.m | 72 ++++++++++++++++++++++++
inst/@sym/ctranspose.m | 38 ++++++++++++-
inst/@sym/degree.m | 1 +
inst/@sym/disp.m | 2 +-
inst/@sym/display.m | 7 ++-
inst/@sym/dot.m | 74 ++++++++++++++++++++++++
inst/@sym/expm.m | 21 ++++++-
inst/@sym/function_handle.m | 15 ++++-
inst/@sym/ifourier.m | 8 +--
inst/@sym/private/mat_replace.m | 4 +-
inst/@sym/private_tests.tst | 26 ---------
inst/@sym/subsasgn.m | 6 +-
inst/@sym/sym.m | 89 +++++++++++++++++++----------
inst/@sym/transpose.m | 38 ++++++++++++-
inst/@symfun/diff.m | 3 +-
inst/@symfun/symfun.m | 34 ++++++++---
inst/@symfun/symvar.m | 2 +-
inst/octsympy_doctests.m | 50 -----------------
inst/private/python_copy_vars_to.m | 3 +-
inst/private/readblock.m | 2 +-
inst/python_cmd.m | 23 ++++----
inst/sympref.m | 39 ++++++-------
inst/vpa.m | 2 +-
make_release_packages.sh | 4 +-
make_windows_package.sh | 4 +-
src/aclocal.m4 | 43 ++++++++------
src/autom4te.cache/output.0 | 111 +++++++++++++++++++++++++++---------
src/autom4te.cache/output.1 | 111 +++++++++++++++++++++++++++---------
src/autom4te.cache/requests | 112 ++++++++++++++++++-------------------
src/autom4te.cache/traces.0 | 52 +++++++++--------
src/autom4te.cache/traces.1 | 17 +++---
src/configure | 111 +++++++++++++++++++++++++++---------
src/configure.ac | 17 +++++-
40 files changed, 849 insertions(+), 381 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 415467c..0c76e11 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,23 +10,26 @@ matrix:
- python: "3.4"
env: SYMPY_VER=0.7.6 DOCTEST=yes
+# need octave devel pkgs for doctest (has compiled code as of July 2015)
+# TODO: once doctest is in OF, change to "install -forge" below
install:
- sudo apt-add-repository --yes ppa:octave/stable
- sudo apt-get update
- - sudo apt-get install octave
+ - sudo apt-get install octave liboctave-dev
- "pip install sympy==$SYMPY_VER"
- - git clone --single-branch --branch fortravis https://github.com/cbm755/doctest-for-matlab
+ - wget https://github.com/catch22/octave-doctest/releases/download/v0.4.0/doctest-0.4.0.tar.gz
+ - octave --eval "pkg install doctest-0.4.0.tar.gz"
# all commands here must have exit code 0 for the build to be called "passing"
+# debugging: octave --eval "syms x; A = [x sin(x) x^3]; A; exit(0)"
script:
- - octave --eval "a=42;disp(a);ver;pwd;exit(0)"
+ - octave --eval "ver; pwd; exit(0)"
- pushd src; make; popd
- pushd inst
- - octave --eval "syms x; A = [x sin(x) x^3]; exit(0)"
- octave --eval "r = octsympy_tests; exit(r)"
- cat octsympy_tests.log
- if [ "x$DOCTEST" = "xyes" ]; then
- octave --path ../doctest-for-matlab/inst --eval "r = octsympy_doctests; exit(~r)";
+ octave --eval "pkg load doctest; syms x; r = doctest('.'); exit(~r)";
fi
- popd
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 166a498..72a966a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -7,6 +7,7 @@ Andrés Prieto
Carnë Draug
Vadim Gribanov
Alexander Misel
+Mike Miller
(Please contact the developers if your name should be here but isn't!)
diff --git a/DESCRIPTION b/DESCRIPTION
index 07bdee3..c0b567f 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Name: symbolic
-Version: 2.2.2
-Date: 2015-07-03
+Version: 2.2.3
+Date: 2015-11-25
Author: Colin B. Macdonald <cbm at m.fsf.org>
Maintainer: Colin B. Macdonald <cbm at m.fsf.org>
Title: Octave Symbolic Package using SymPy
@@ -12,5 +12,5 @@ Description: The Octave-Forge Symbolic package adds symbolic calculation
required. Compatibility with other symbolic toolboxes is intended.
Categories: symbolic
Url: http://github.com/cbm755/octsympy
-SystemRequirements: sympy (>= 0.7.5)
-BuildRequires: python
+SystemRequirements: python, sympy (>= 0.7.5)
+BuildRequires: python, sympy (>= 0.7.5)
diff --git a/NEWS b/NEWS
index a370144..beca16f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,23 @@
+octsympy 2.2.3 (2015-11-25)
+===========================
+
+ * New commands:
+
+ cross
+ dot
+
+ * sym('var') is more robust in case var happens to be a special
+ value in SymPy. Now sym('E') is just a symbol rather than
+ exp(sym(1)). Also sym('E1') and sym('Eq') no longer give errors.
+
+ * Fix bug in assigning to column vectors, thanks to Grzegorz Dudziuk.
+
+ * During install, test for PATH problems on Windows (issue #236).
+
+ * Fix for Octave 4.1+ developement versions, thanks to Mike Miller.
+
+
+
octsympy 2.2.2 (2015-07-03)
===========================
diff --git a/README.md b/README.md
index b3ba2bd..76492cb 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,11 @@ Octave itself (it includes SymPy and a Python interpreter.)
Alternatively, you can install Python and SymPy yourself and use the
standard `octsympy-0.1.2.zip` package.
+If you encounter any difficulties (even minor ones) please read and
+if possible help us improve the
+[wiki page on Windows Installation](https://github.com/cbm755/octsympy/wiki/Notes-on-Windows-installation).
+
+
How to Install on Matlab
diff --git a/convert_comments.m b/convert_comments.m
index 74f210c..bbe094b 100644
--- a/convert_comments.m
+++ b/convert_comments.m
@@ -13,7 +13,7 @@ function convert_comments (basedir, subdir, dirout)
for i=1:length(files)
if (~files(i).isdir)
- [dir,name,ext,ver] = fileparts(files(i).name);
+ [dir, name, ext] = fileparts(files(i).name);
if (strcmp(ext, '.m'))
if isempty(subdir)
octname = [name ext];
@@ -42,14 +42,7 @@ end
function success = convert_oct_2_ml (fname, foutname)
-%function convert_oct_2_ml (fcn)
- %fname = sprintf('@sym/%s.m', fcn)
- %foutname = sprintf('ml_%s.m', fcn)
-
-%fname, foutname
- [dir,fcn,ext,ver] = fileparts(fname);
-%chdir(dir)
-%fname = [fcn ext]
+ [dir, fcn, ext] = fileparts(fname);
newl = sprintf('\n');
@@ -156,22 +149,25 @@ function success = convert_oct_2_ml (fname, foutname)
error('too many lookfor lines?')
end
len = length(lookforstr);
- J = I(1) + len;
-
- % find next non-empty char
- %while isspace(usestr(J))
- % J = J + 1;
- %end
-
- % let's be more conservative trim newline in usual case:
- if ~isspace(usestr(J))
- error('no space or newline after lookfor line?');
+ J = I + len;
+
+ % if usestr has only a lookfor line then no need to see what's next
+ if (J < length(usestr))
+ % find next non-empty char
+ %while isspace(usestr(J))
+ % J = J + 1;
+ %end
+
+ % let's be more conservative trim newline in usual case:
+ if ~isspace(usestr(J))
+ error('no space or newline after lookfor line?');
+ end
+ J = J + 1;
end
- J = J + 1;
- usestr = usestr([1:(I(1)-1) J:end]);
+ usestr = usestr([1:(I-1) J:end]);
- use = strsplit(usestr, newl);
+ use = strsplit(usestr, newl, 'CollapseDelimiters', false);
%% remove this string
% and make sure these lines have the correct function name
diff --git a/extract_tests_for_matlab.m b/extract_tests_for_matlab.m
index fd3e6c2..9ed46f0 100644
--- a/extract_tests_for_matlab.m
+++ b/extract_tests_for_matlab.m
@@ -86,7 +86,7 @@ endfunction
% GPL
function body = __extract_test_code (nm)
fid = fopen (nm, "rt");
- body = [];
+ body = '';
if (fid >= 0)
while (! feof (fid))
ln = fgetl (fid);
diff --git a/inst/@sym/cross.m b/inst/@sym/cross.m
new file mode 100644
index 0000000..22c2cf2
--- /dev/null
+++ b/inst/@sym/cross.m
@@ -0,0 +1,72 @@
+%% Copyright (C) 2015 Colin B. Macdonald
+%%
+%% This file is part of OctSymPy.
+%%
+%% OctSymPy is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 3 of the License,
+%% or (at your option) any later version.
+%%
+%% This software is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty
+%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+%% the GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public
+%% License along with this software; see the file COPYING.
+%% If not, see <http://www.gnu.org/licenses/>.
+
+%% -*- texinfo -*-
+%% @documentencoding UTF-8
+%% @deftypefn {Function File} {@var{c} =} cross (@var{a}, @var{b})
+%% Symbolic cross product.
+%%
+%% Examples:
+%% @example
+%% @group
+%% a = [sym('a1'); sym('a2'); sym('a3')];
+%% b = [sym('b1'); sym('b2'); sym('b3')];
+%% cross(a, b)
+%% @result{} (sym 3×1 matrix)
+%% ⎡a₂⋅b₃ - a₃⋅b₂ ⎤
+%% ⎢ ⎥
+%% ⎢-a₁⋅b₃ + a₃⋅b₁⎥
+%% ⎢ ⎥
+%% ⎣a₁⋅b₂ - a₂⋅b₁ ⎦
+%%
+%% cross(a, a)
+%% @result{} (sym 3×1 matrix)
+%% ⎡0⎤
+%% ⎢ ⎥
+%% ⎢0⎥
+%% ⎢ ⎥
+%% ⎣0⎦
+%% @end group
+%% @end example
+%%
+%% @seealso{dot}
+%% @end deftypefn
+
+function c = cross(a, b)
+
+ cmd = { 'a, b = _ins'
+ 'return a.cross(b),'
+ };
+
+ c = python_cmd (cmd, sym(a), sym(b));
+
+end
+
+
+%!test
+%! a = sym([1; 0; 0]);
+%! b = sym([0; 1; 0]);
+%! c = cross(a, b);
+%! assert (isequal (c, sym([0; 0; 1])))
+
+%!test
+%! syms x
+%! a = sym([x; 0; 0]);
+%! b = sym([0; 1; 0]);
+%! c = cross(a, b);
+%! assert (isequal (c, sym([0; 0; x])))
diff --git a/inst/@sym/ctranspose.m b/inst/@sym/ctranspose.m
index f202e8d..7123b86 100644
--- a/inst/@sym/ctranspose.m
+++ b/inst/@sym/ctranspose.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -17,9 +17,45 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{y} =} ctranspose (@var{x})
%% Conjugate (Hermitian) transpose of a symbolic array.
%%
+%% Example:
+%% @example
+%% @group
+%% >> syms z
+%% >> syms x real
+%% >> A = [1 x z; sym(4) 5 6+7i]
+%% @result{} A = (sym 2×3 matrix)
+%% ⎡1 x z ⎤
+%% ⎢ ⎥
+%% ⎣4 5 6 + 7⋅ⅈ⎦
+%% >> ctranspose(A)
+%% @result{} (sym 3×2 matrix)
+%% ⎡1 4 ⎤
+%% ⎢ ⎥
+%% ⎢x 5 ⎥
+%% ⎢ ⎥
+%% ⎢_ ⎥
+%% ⎣z 6 - 7⋅ⅈ⎦
+%% @end group
+%% @end example
+%%
+%% This can be abbreviated to:
+%% @example
+%% @group
+%% >> A'
+%% @result{} (sym 3×2 matrix)
+%% ⎡1 4 ⎤
+%% ⎢ ⎥
+%% ⎢x 5 ⎥
+%% ⎢ ⎥
+%% ⎢_ ⎥
+%% ⎣z 6 - 7⋅ⅈ⎦
+%% @end group
+%% @end example
+%%
%% @seealso{transpose, conj}
%% @end deftypefn
diff --git a/inst/@sym/degree.m b/inst/@sym/degree.m
index 4211051..84428d3 100644
--- a/inst/@sym/degree.m
+++ b/inst/@sym/degree.m
@@ -17,6 +17,7 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{n} =} degree (@var{p})
%% @deftypefnx {Function File} {@var{n} =} degree (@var{p}, @var{x})
%% Extract numerator and demoninator of symbolic expression.
diff --git a/inst/@sym/disp.m b/inst/@sym/disp.m
index d7b134f..e8cf3a1 100644
--- a/inst/@sym/disp.m
+++ b/inst/@sym/disp.m
@@ -89,7 +89,7 @@ function varargout = disp(x, wh)
if (nargout == 0)
disp(s)
else
- varargout = {disp(s)}; % add a newline
+ varargout = {[s sprintf('\n')]}; % add a newline
end
end
diff --git a/inst/@sym/display.m b/inst/@sym/display.m
index 4490232..b734de7 100644
--- a/inst/@sym/display.m
+++ b/inst/@sym/display.m
@@ -78,7 +78,12 @@ function display(x)
unicode_dec = false;
end
display_snippet = sympref('snippet');
- loose = strcmp(get(0,'FormatSpacing'), 'loose');
+ if (exist('OCTAVE_VERSION', 'builtin'))
+ % Octave 4.1 dropped (temporarily?) the get(0,...) approach
+ loose = eval('! __compactformat__ ()');
+ else
+ loose = strcmp(get(0, 'FormatSpacing'), 'loose');
+ end
%% Get terminal width, mainly for snippets
% works in matlab gui & -nodesktop but not the most up-to-date
diff --git a/inst/@sym/dot.m b/inst/@sym/dot.m
new file mode 100644
index 0000000..bc0f4c2
--- /dev/null
+++ b/inst/@sym/dot.m
@@ -0,0 +1,74 @@
+%% Copyright (C) 2015 Colin B. Macdonald
+%%
+%% This file is part of OctSymPy.
+%%
+%% OctSymPy is free software; you can redistribute it and/or modify
+%% it under the terms of the GNU General Public License as published
+%% by the Free Software Foundation; either version 3 of the License,
+%% or (at your option) any later version.
+%%
+%% This software is distributed in the hope that it will be useful,
+%% but WITHOUT ANY WARRANTY; without even the implied warranty
+%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+%% the GNU General Public License for more details.
+%%
+%% You should have received a copy of the GNU General Public
+%% License along with this software; see the file COPYING.
+%% If not, see <http://www.gnu.org/licenses/>.
+
+%% -*- texinfo -*-
+%% @documentencoding UTF-8
+%% @deftypefn {Function File} {@var{s} =} dot (@var{a}, @var{b})
+%% Symbolic dot (scalar) product.
+%%
+%% Examples:
+%% @example
+%% @group
+%% a = [sym('a1'); sym('a2'); sym('a3')];
+%% b = [sym('b1'); sym('b2'); sym('b3')];
+%% dot(a, b)
+%% @result{} (sym) a₁⋅b₁ + a₂⋅b₂ + a₃⋅b₃
+%% dot(a, a)
+%% @result{} (sym)
+%% 2 2 2
+%% a₁ + a₂ + a₃
+%% @end group
+%% @end example
+%%
+%% @example
+%% @group
+%% syms x
+%% a = [x; 0; 0];
+%% b = [0; 0; sym(1)];
+%% dot(a, b)
+%% @result{} ans = (sym) 0
+%% @end group
+%% @end example
+%%
+%% @seealso{cross}
+%% @end deftypefn
+
+function c = dot(a, b)
+
+ cmd = { 'a, b = _ins'
+ 'return a.dot(b),'
+ };
+
+ c = python_cmd (cmd, sym(a), sym(b));
+
+end
+
+
+%!test
+%! a = sym([1; 1; 0]);
+%! b = sym([1; 2; 4]);
+%! c = dot(a, b);
+%! assert (isequal (c, sym(3)))
+
+%!test
+%! syms x
+%! a = sym([x; 0; 0]);
+%! b = sym([0; 1; 0]);
+%! c = dot(a, b);
+%! assert (isequal (c, sym(0)))
+
diff --git a/inst/@sym/expm.m b/inst/@sym/expm.m
index 6b0d360..2e50157 100644
--- a/inst/@sym/expm.m
+++ b/inst/@sym/expm.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -17,9 +17,28 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{B} =} expm (@var{A})
%% Symbolic matrix exponential.
%%
+%% Example:
+%% @example
+%% @group
+%% >> A = [sym(4) 1; sym(0) 4]
+%% @result{} A = (sym 2×2 matrix)
+%% ⎡4 1⎤
+%% ⎢ ⎥
+%% ⎣0 4⎦
+%% >> expm(A)
+%% @result{} (sym 2×2 matrix)
+%% ⎡ 4 4⎤
+%% ⎢ℯ ℯ ⎥
+%% ⎢ ⎥
+%% ⎢ 4⎥
+%% ⎣0 ℯ ⎦
+%% @end group
+%% @end example
+%%
%% @end deftypefn
%% Author: Colin B. Macdonald
diff --git a/inst/@sym/function_handle.m b/inst/@sym/function_handle.m
index 6414f29..af19226 100644
--- a/inst/@sym/function_handle.m
+++ b/inst/@sym/function_handle.m
@@ -40,6 +40,19 @@
%% @end group
%% @end example
%%
+%% Multiple arguments correspond to multiple outputs of the
+%% function. For example, the final @code{x} in this example
+%% specifies the third output (rather than the input):
+%% @example
+%% @group
+%% >> h = function_handle(x^2, 5*x, x);
+%% >> [a, b, c] = h(2)
+%% @result{} a = 4
+%% @result{} b = 10
+%% @result{} c = 2
+%% @end group
+%% @end example
+%%
%% The order and number of inputs can be specified:
%% @example
%% @group
@@ -67,7 +80,7 @@
%% @end example
%%
%% FIXME: naming outputs with @var{PARAM} as
-%% 'outputs' not implemented.
+%% @code{outputs} not implemented.
%%
%% FIXME: does not ``optimize'' code, for example, using common
%% subexpression elimination.
diff --git a/inst/@sym/ifourier.m b/inst/@sym/ifourier.m
index 68c039c..a273c09 100644
--- a/inst/@sym/ifourier.m
+++ b/inst/@sym/ifourier.m
@@ -28,12 +28,12 @@
%% @example
%% @group
%% >> syms k
-%% >> F = pi*exp(-k^2/4);
+%% >> F = sqrt(sym(pi))*exp(-k^2/4);
%% >> ifourier(F)
%% @result{} (sym)
-%% 2
-%% -x
-%% √π⋅ℯ
+%% 2
+%% -x
+%% ℯ
%% @end group
%% @group
%% >> F = 2*sym(pi)*dirac(k);
diff --git a/inst/@sym/private/mat_replace.m b/inst/@sym/private/mat_replace.m
index 96d7442..6851340 100644
--- a/inst/@sym/private/mat_replace.m
+++ b/inst/@sym/private/mat_replace.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -39,7 +39,7 @@ function z = mat_replace(A, subs, b)
if (n == 0 || n == 1)
c = subs{1}; r = ones(size(c));
elseif (m == 1)
- r = subs{1}; c = one(size(r));
+ r = subs{1}; c = ones(size(r));
else
% linear indices into 2D array
[r, c] = ind2sub (size(A), subs{1});
diff --git a/inst/@sym/private_tests.tst b/inst/@sym/private_tests.tst
deleted file mode 100644
index 8ed7732..0000000
--- a/inst/@sym/private_tests.tst
+++ /dev/null
@@ -1,26 +0,0 @@
-%% Copyright (C) 2014 Colin B. Macdonald
-%%
-%% This file is part of OctSymPy.
-%%
-%% OctSymPy is free software; you can redistribute it and/or modify
-%% it under the terms of the GNU General Public License as published
-%% by the Free Software Foundation; either version 3 of the License,
-%% or (at your option) any later version.
-%%
-%% This software is distributed in the hope that it will be useful,
-%% but WITHOUT ANY WARRANTY; without even the implied warranty
-%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-%% the GNU General Public License for more details.
-%%
-%% You should have received a copy of the GNU General Public
-%% License along with this software; see the file COPYING.
-%% If not, see <http://www.gnu.org/licenses/>.
-
-
-%% Tests for private/
-% Put tests here that would otherwise be in .m files in private/
-% https://savannah.gnu.org/bugs/?38776
-
-% FIXME: would be nice if this worked, to move the mat_* helpers
-
-%!assert(true)
diff --git a/inst/@sym/subsasgn.m b/inst/@sym/subsasgn.m
index b9d1155..b6a68f1 100644
--- a/inst/@sym/subsasgn.m
+++ b/inst/@sym/subsasgn.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -183,6 +183,10 @@ end
%! x(true) = 88;
%! assert(isequal( x, sym(88) ));
+%% bug: assignment to column vector used to fail
+%!test
+%! A = sym(zeros(3,1));
+%! A(1) = 5;
%% symfun creation (generic function)
%!test
diff --git a/inst/@sym/sym.m b/inst/@sym/sym.m
index 6a185ba..47568bf 100644
--- a/inst/@sym/sym.m
+++ b/inst/@sym/sym.m
@@ -208,7 +208,7 @@ function s = sym(x, varargin)
return
elseif (isinteger(x) && nargin==1)
- s = sym(num2str(x));
+ s = sym(num2str(x, '%ld'));
return
elseif (isa (x, 'double') && nargin==1)
@@ -269,9 +269,6 @@ function s = sym(x, varargin)
elseif (isa (x, 'char'))
- useSymbolNotS = false;
- cmd = [];
-
asm = [];
if (nargin == 2 && isequal(size(varargin{1}), [1 2]))
s = make_sym_matrix(x, varargin{1});
@@ -279,53 +276,58 @@ function s = sym(x, varargin)
elseif (nargin >= 2)
% assume the remaining inputs are assumptions
asm = varargin;
- useSymbolNotS = true;
end
doDecimalCheck = true;
- % various special cases for x
- if (strcmp(x, 'pi'))
- cmd = 'z = sp.pi';
- elseif (strcmpi(x, 'inf')) || (strcmpi(x, '+inf'))
- cmd = 'z = sp.oo';
+ % preprocess
+ if (strcmpi(x, 'inf')) || (strcmpi(x, '+inf'))
+ x = 'oo';
elseif (strcmpi(x, '-inf'))
- cmd = 'z = -sp.oo';
- elseif (strcmpi(x, 'nan'))
- cmd = 'z = sp.nan';
+ x = '-oo';
elseif (strcmpi(x, 'i'))
- cmd = 'z = sp.I';
- %% Symbols with special meanings in SymPy: Issue #23
- elseif (strcmp(x, 'beta') || strcmp(x, 'gamma') || ...
- strcmp(x, 'zeta') || strcmp(x, 'Chi') || ...
- strcmp(x, 'S') || strcmp(x, 'N') || strcmp(x, 'Q'))
- useSymbolNotS = true;
+ x = 'I';
+ elseif (strcmpi(x, '-i'))
+ x = '-I';
+ elseif (strcmpi(x, 'nan'))
+ x = 'nan';
elseif (strcmp(x, 'lambda'))
x = 'lamda';
- useSymbolNotS = true;
elseif (strcmp(x, 'Lambda'))
x = 'Lamda';
+ end
+
+ % Decide whether to pass to S() or Symbol()
+ if (any(strcmp(x, {'pi', 'I', 'oo', 'zoo', 'nan'})))
+ useSymbolNotS = false;
+ elseif (regexp(x, '^-?\d*\.?\d*(e-?\d+)?$'))
+ % Numbers: integers and floats
+ useSymbolNotS = false;
+ elseif (regexp(x, '^\w+$'))
+ % Words. Note must follow numbers case.
+ % Use Symbol instead of S, e.g., for Issue #23:
+ % strcmp(x, {'beta' 'gamma' 'zeta' 'Chi' 'E' 'E1' 'Ei' 'S' 'N' 'Q'})
+ % But we also expect sym('Eq') to work, so match all single words
useSymbolNotS = true;
elseif (~isempty (strfind (x, '(') ))
- %disp('debug: has a "(", not a symfun, assuming srepr!')
+ % SymPy "srepr" or other raw python code
useSymbolNotS = false;
doDecimalCheck = false;
else
- %disp(['debug: just a regular symbol: ' x])
+ % Other non-symbols such as sym('1/3')
+ useSymbolNotS = false;
end
if (~useSymbolNotS)
- % if we're not forcing Symbol() then we use S(), unless
- % cmd already set.
- if (isempty(cmd))
- if (doDecimalCheck && ~isempty(strfind(x, '.')))
- warning('possibly unintended decimal point in constructor string');
- end
- % x is raw sympy, could have various quotes in it
- cmd = sprintf('z = sympy.S("%s")', strrep(x, '"', '\"'));
+ % Use S(), as we're not forcing Symbol()
+ assert (isempty (asm)) % sym('pi', 'integer')
+ if (doDecimalCheck && ~isempty(strfind(x, '.')))
+ warning('possibly unintended decimal point in constructor string');
end
+ % x is raw sympy, could have various quotes in it
+ cmd = sprintf('z = sympy.S("%s")', strrep(x, '"', '\"'));
+
else % useSymbolNotS
- assert(isempty(cmd), 'inconsistent input')
if (isempty(asm))
cmd = sprintf('z = sympy.Symbol("%s")', x);
@@ -615,6 +617,14 @@ end
%! s = sym(a);
%! assert (isequal (double(a), [1 2 100]))
+%!xtest
+%! % bigger int64 integer types: TODO: passes on Octave 4?
+%! q = int64(123456789012345);
+%! w = 10000*q + 123;
+%! a = sym('1234567890123450123');
+%! b = sym(w);
+%! assert (isequal (a, b))
+
%!test
%! % sym(double) heuristic
%! s = warning ('off', 'OctSymPy:sym:rationalapprox');
@@ -626,6 +636,17 @@ end
%! assert (isequal (x/sym(pi), sym(1)/123))
%! warning (s)
+%!test
+%! % symbols with special sympy names
+%! syms Ei Eq
+%! assert (regexp(char(Eq), '^Symbol'))
+%! assert (regexp(char(Ei), '^Symbol'))
+
+%!test
+%! % E can be a sym not just exp(sym(1))
+%! syms E
+%! assert (~logical (E == exp(sym(1))))
+
%!error <assumption is not supported>
%! x = sym('x', 'positive2');
@@ -635,6 +656,12 @@ end
%!error <assumption is not supported>
%! x = sym('x', 'integer2', 'positive');
+%!error <failed>
+%! x = sym('-pi', 'positive')
+
+%!error <failed>
+%! x = sym('pi', 'integer')
+
%!xtest
%! % multiple assumptions
%! % FIXME: xtest for sympy <= 0.7.6 where a is the full dict
diff --git a/inst/@sym/transpose.m b/inst/@sym/transpose.m
index 4408ad1..6dab7ac 100644
--- a/inst/@sym/transpose.m
+++ b/inst/@sym/transpose.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -17,8 +17,42 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{y} =} transpose (@var{x})
-%% Transpose of a symbolic array.
+%% Structural transpose (not conjugate) of a symbolic array.
+%%
+%% Example:
+%% @example
+%% @group
+%% >> syms z
+%% >> syms x real
+%% >> A = [1 x z; sym(4) 5 6+7i]
+%% @result{} A = (sym 2×3 matrix)
+%% ⎡1 x z ⎤
+%% ⎢ ⎥
+%% ⎣4 5 6 + 7⋅ⅈ⎦
+%% >> transpose(A)
+%% @result{} (sym 3×2 matrix)
+%% ⎡1 4 ⎤
+%% ⎢ ⎥
+%% ⎢x 5 ⎥
+%% ⎢ ⎥
+%% ⎣z 6 + 7⋅ⅈ⎦
+%% @end group
+%% @end example
+%%
+%% This can be abbreviated to:
+%% @example
+%% @group
+%% >> A.'
+%% @result{} (sym 3×2 matrix)
+%% ⎡1 4 ⎤
+%% ⎢ ⎥
+%% ⎢x 5 ⎥
+%% ⎢ ⎥
+%% ⎣z 6 + 7⋅ⅈ⎦
+%% @end group
+%% @end example
%%
%% @seealso{ctranspose}
%% @end deftypefn
diff --git a/inst/@symfun/diff.m b/inst/@symfun/diff.m
index cbef63d..6186825 100644
--- a/inst/@symfun/diff.m
+++ b/inst/@symfun/diff.m
@@ -17,6 +17,7 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{g} =} diff (@var{f})
%% @deftypefnx {Function File} {@var{g} =} diff (@var{f}, @var{x})
%% @deftypefnx {Function File} {@var{g} =} diff (@var{f}, @dots{})
@@ -49,7 +50,7 @@
%% ⎜──(u(x))⎟│
%% ⎝dx ⎠│x=2
%%
-%% >> syms 'f(x, y)'
+%% >> syms f(x, y)
%% >> diff(f, x, y, y)(3, 2) % a third partial eval at (3, 2)
%% @result{} ans = (sym)
%% ⎛⎛ 3 ⎞│ ⎞│
diff --git a/inst/@symfun/symfun.m b/inst/@symfun/symfun.m
index c90a994..873e37b 100644
--- a/inst/@symfun/symfun.m
+++ b/inst/@symfun/symfun.m
@@ -1,4 +1,4 @@
-%% Copyright (C) 2014 Colin B. Macdonald
+%% Copyright (C) 2014, 2015 Colin B. Macdonald
%%
%% This file is part of OctSymPy.
%%
@@ -17,13 +17,19 @@
%% If not, see <http://www.gnu.org/licenses/>.
%% -*- texinfo -*-
+%% @documentencoding UTF-8
%% @deftypefn {Function File} {@var{f} =} symfun (@var{expr}, @var{vars})
%% Define a symbolic function (not usually called directly).
%%
%% A symfun can be abstract or concrete. An abstract symfun
%% represents an unknown function (for example, in a differential
-%% equation). A concrete symfun represents a known function such
-%% as f(x) = sin(x).
+%% equation). A concrete symfun represents a known function such as
+%% @iftex
+%% @math{f(x) = \sin(x)}.
+%% @end iftex
+%% @ifnottex
+%% f(x) = sin(x).
+%% @end ifnottex
%%
%% A concrete symfun:
%% @example
@@ -60,10 +66,17 @@
%% @end example
%% Instead, use @code{g(x)} on the left-hand side as above.
%%
-%% You can make multidimensional concrete or abstract symfuns using
-%% @code{syms g(x,y)}. However, a bug in the Octave parser in
-%% versions before 4.0 means this 2D example will give a parse
-%% error. A workaround is to enclose the argument in a string:
+%% You can make multidimensional concrete or abstract symfuns:
+%% @example
+%% >> syms x y
+%% >> g(x, y) = 2*x + sin(y)
+%% @result{} g(x, y) = (symfun) 2⋅x + sin(y)
+%% >> syms g(x, y)
+%% >> g
+%% @result{} g(x, y) = (symfun) g(x, y)
+%% @end example
+%% However, on old versions of Octave (before 4.0), one needs to
+%% workaround a parsing bug:
%% @example
%% >> syms 'g(x, y)'
%% >> g
@@ -85,12 +98,17 @@
%% @end example
%%
%% This allows, for example, creating an abstract function formally
-%% of x, y but depending only on x:
+%% of @code{x}, @code{y} but depending only on @code{x}:
%% @example
%% >> syms x y
%% >> h = symfun(sym('h(x)'), [x y])
%% @result{} h(x, y) = (symfun) h(x)
%% @end example
+%% which is the same as:
+%% @example
+%% >> h(x,y) = sym('h(x)')
+%% @result{} h(x, y) = (symfun) h(x)
+%% @end example
%%
%% @seealso{sym, syms}
%% @end deftypefn
diff --git a/inst/@symfun/symvar.m b/inst/@symfun/symvar.m
index 4cf4c76..863067b 100644
--- a/inst/@symfun/symvar.m
+++ b/inst/@symfun/symvar.m
@@ -29,7 +29,7 @@
%% Example:
%% @example
%% @group
-%% >> syms a x 'f(t, s)'
+%% >> syms a x f(t, s)
%% >> symvar (f, 1)
%% @result{} (sym) t
%% >> symvar (f, 2)
diff --git a/inst/octsympy_doctests.m b/inst/octsympy_doctests.m
deleted file mode 100644
index 2ae88c5..0000000
--- a/inst/octsympy_doctests.m
+++ /dev/null
@@ -1,50 +0,0 @@
-%% Copyright (C) 2015 Colin B. Macdonald
-%%
-%% This file is part of OctSymPy.
-%%
-%% OctSymPy is free software; you can redistribute it and/or modify
-%% it under the terms of the GNU General Public License as published
-%% by the Free Software Foundation; either version 3 of the License,
-%% or (at your option) any later version.
-%%
-%% This software is distributed in the hope that it will be useful,
-%% but WITHOUT ANY WARRANTY; without even the implied warranty
-%% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
-%% the GNU General Public License for more details.
-%%
-%% You should have received a copy of the GNU General Public
-%% License along with this software; see the file COPYING.
-%% If not, see <http://www.gnu.org/licenses/>.
-
-%% -*- texinfo -*-
-%% @deftypefn {Function File} {@var{r} =} octsympy_doctests ()
-%% Run doctests for OctSymPy, and return true if passing.
-%%
-%% You will need to have @code{doctest-for-matlab} installed from
-%% @url{https://github.com/catch22/doctest-for-matlab}. It must
-%% already be in your path.
-%%
-%% @end deftypefn
-
-%% Author: Colin B. Macdonald
-%% Keywords: tests
-
-function r = octsympy_doctests()
-
- syms x
- sympref snippet off
- % FIXME: probably others to do not have it installed here!
- % addpath('../doctest-for-matlab')
-
- [n, fail, extract_fail] = doctest({'logical', 'symfun', 'sym', ...
- 'assumptions', 'catalan', 'eulergamma', 'fibonacci', 'python_cmd', ...
- 'sympref', 'vpa', 'bernoulli', 'digits', 'evalpy', 'findsymbols', ...
- 'poly2sym', 'syms', 'vpasolve'});
-
- r = fail;
-
-end
-
-
-% just to keep octsympy_tests quiet
-%!assert(true)
diff --git a/inst/private/python_copy_vars_to.m b/inst/private/python_copy_vars_to.m
index cdc4478..cc94977 100644
--- a/inst/private/python_copy_vars_to.m
+++ b/inst/private/python_copy_vars_to.m
@@ -50,7 +50,8 @@ function a = do_list(indent, in, varlist)
end
elseif (isinteger(x) && isscalar(x))
- c=c+1; a{c} = sprintf('%s%s.append(%s) # int type', sp, in, num2str(x));
+ c=c+1; a{c} = sprintf('%s%s.append(%s) # int type', ...
+ sp, in, num2str(x, '%ld'));
elseif (isfloat(x) && isscalar(x))
% Floating point input. By default, all Octave numbers are
diff --git a/inst/private/readblock.m b/inst/private/readblock.m
index 1f5daab..938df9d 100644
--- a/inst/private/readblock.m
+++ b/inst/private/readblock.m
@@ -2,7 +2,7 @@ function [A, err] = readblock(fout, timeout)
%private function: read one block
% how long to wait before displaying "Waiting..."
- wait_disp_thres = 2.0;
+ wait_disp_thres = 4.0;
tagblock = '<output_block>';
tagendblock = '</output_block>';
diff --git a/inst/python_cmd.m b/inst/python_cmd.m
index 1a095b3..7f3b943 100644
--- a/inst/python_cmd.m
+++ b/inst/python_cmd.m
@@ -33,9 +33,8 @@
%% >> x = 10; y = 2;
%% >> cmd = '(x,y) = _ins; return (x+y,x-y)';
%% >> [a, b] = python_cmd (cmd, x, y)
-%% @result{}
-%% a = 12
-%% b = 8
+%% @result{} a = 12
+%% @result{} b = 8
%% @end group
%% @end example
%%
@@ -56,7 +55,7 @@
%% (Python gurus will know why).
%%
%% Instead of @code{return}, you can append to the Python list
-%% @code{_outs}@:
+%% @code{_outs}:
%% @example
%% @group
%% >> cmd = '(x,y) = _ins; _outs.append(x**y)';
@@ -67,13 +66,15 @@
%%
%% You can also pass a cell-array of lines of code. But be careful
%% with whitespace: its Python!
-%% @verbatim
-%% cmd = { '(x,) = _ins'
-%% 'if x.is_Matrix:'
-%% ' return (x.T,)'
-%% 'else:'
-%% ' return (x,)' };
-%% @end verbatim
+%% @example
+%% @group
+%% >> cmd = @{ '(x,) = _ins'
+%% .. 'if x.is_Matrix:'
+%% .. ' return (x.T,)'
+%% .. 'else:'
+%% .. ' return (x,)' @};
+%% @end group
+%% @end example
%% The cell array can be either a row or a column vector.
%% Each of these strings probably should not have any newlines
%% (other than escaped ones e.g., inside strings). An exception
diff --git a/inst/sympref.m b/inst/sympref.m
index d24210b..ac458bf 100644
--- a/inst/sympref.m
+++ b/inst/sympref.m
@@ -29,17 +29,18 @@
%% @var{args} are documented below.
%%
%%
-%% *Python executable* path/command:
-%% @comment TODO switch to DOCSKIP example once CI has recent doctest
-%% @verbatim
-%% >> sympref python '/usr/bin/python'
-%% >> sympref python 'C:\Python\python.exe'
-%% >> sympref python 'N:\myprogs\py.exe'
-%% @end verbatim
+%% @strong{Python executable} path/command:
+%% @example
+%% @group
+%% >> sympref python '/usr/bin/python' @c doctest: +SKIP
+%% >> sympref python 'C:\Python\python.exe' @c doctest: +SKIP
+%% >> sympref python 'N:\myprogs\py.exe' @c doctest: +SKIP
+%% @end group
+%% @end example
%% Default is an empty string; in which case OctSymPy just runs
%% @code{python} and assumes the path is set appropriately.
%%
-%% *Display* of syms:
+%% @strong{Display} of syms:
%% @example
%% @group
%% >> sympref display
@@ -72,7 +73,7 @@
%% symbolic expressions. If that doesn't work (e.g., if you
%% see @code{?} characters) then try the @code{ascii} option.
%%
-%% *Communication mechanism*:
+%% @strong{Communication mechanism}:
%% @example
%% >> sympref ipc
%% @result{} ans = default
@@ -100,14 +101,14 @@
%% [for debugging, may not be supported long-term].
%% @end itemize
%%
-%% *Reset*: reset the SymPy communication mechanism. This can be
+%% @strong{Reset}: reset the SymPy communication mechanism. This can be
%% useful after an error occurs and the connection with Python
%% becomes confused.
-%% @verbatim
-%% >> sympref reset
-%% @end verbatim
+%% @example
+%% >> sympref reset @c doctest: +SKIP
+%% @end example
%%
-%% *Snippets*: when displaying a sym object, we quote the SymPy
+%% @strong{Snippets}: when displaying a sym object, we quote the SymPy
%% representation (or a small part of it):
%% @example
%% @group
@@ -115,7 +116,7 @@
%% >> y = [pi x];
%% >> sympref snippet on
%% >> y
-%% @result{} y = (sym 1×2 matrix) “MutableDenseMatrix([[pi, Symbol('x')]])”
+%% @result{} y = (sym 1×2 matrix) “...([[pi, Symbol('x')]])”
%% [π x]
%% >> sympref snippet off
%% >> y
@@ -124,7 +125,7 @@
%% @end group
%% @end example
%%
-%% *Default precision*: control the number of digits used by
+%% @strong{Default precision}: control the number of digits used by
%% variable-precision arithmetic (see also the @ref{digits} command).
%% @example
%% @group
@@ -136,11 +137,11 @@
%% @end example
%%
%%
-%% Report the *version* number:
+%% Report the @strong{version} number:
%% @example
%% @group
%% >> sympref version
-%% @result{} 2.2.2
+%% @result{} 2.2.3
%% @end group
%% @end example
%%
@@ -173,7 +174,7 @@ function varargout = sympref(cmd, arg)
case 'version'
assert (nargin == 1)
- varargout{1} = '2.2.2';
+ varargout{1} = '2.2.3';
case 'display'
if (nargin == 1)
diff --git a/inst/vpa.m b/inst/vpa.m
index e8bee66..613eace 100644
--- a/inst/vpa.m
+++ b/inst/vpa.m
@@ -245,7 +245,7 @@ end
%! assert (isequal (b, c))
%!xtest
-%! % big integers (num2str broken in Octave)
+%! % big integers (workaround poor num2str, works in 4.0?)
%! a = int64(1234567891); a = a*a;
%! b = vpa(a);
%! c = vpa('1524157877488187881');
diff --git a/make_release_packages.sh b/make_release_packages.sh
index 7fc3335..0716ca7 100755
--- a/make_release_packages.sh
+++ b/make_release_packages.sh
@@ -1,9 +1,9 @@
#!/bin/sh
# for day-to-day testing
-VER=2.2.2-dev
+VER=2.2.3-dev
# for release
-#VER=2.2.2
+#VER=2.2.3
#TAG=v${VER}
#----------------------------------------------------------------
diff --git a/make_windows_package.sh b/make_windows_package.sh
index 0550f02..3e1d433 100755
--- a/make_windows_package.sh
+++ b/make_windows_package.sh
@@ -8,9 +8,9 @@ PYEXEREADME=py27910.readme.txt # from the src package
SYMPY=sympy-0.7.6
# for day-to-day testing
-VER=2.2.2-dev
+VER=2.2.3-dev
# for release
-#VER=2.2.2
+#VER=2.2.3
#TAG=v${VER}
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 3a78e6f..8804446 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -196,13 +196,15 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
#
# SYNOPSIS
#
-# AX_PYTHON_MODULE(modname[, fatal])
+# AX_PYTHON_MODULE(modname[, fatal, python])
#
# DESCRIPTION
#
# Checks for Python module.
#
# If fatal is non-empty then absence of a module will trigger an error.
+# The third parameter can either be "python" for Python 2 or "python3" for
+# Python 3; defaults to Python 3.
#
# LICENSE
#
@@ -213,30 +215,35 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 6
+#serial 8
AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
AC_DEFUN([AX_PYTHON_MODULE],[
if test -z $PYTHON;
then
- PYTHON="python"
+ if test -z "$3";
+ then
+ PYTHON="python3"
+ else
+ PYTHON="$3"
+ fi
fi
PYTHON_NAME=`basename $PYTHON`
AC_MSG_CHECKING($PYTHON_NAME module: $1)
- $PYTHON -c "import $1" 2>/dev/null
- if test $? -eq 0;
- then
- AC_MSG_RESULT(yes)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
- else
- AC_MSG_RESULT(no)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=no
- #
- if test -n "$2"
- then
- AC_MSG_ERROR(failed to find required module $1)
- exit 1
- fi
- fi
+ $PYTHON -c "import $1" 2>/dev/null
+ if test $? -eq 0;
+ then
+ AC_MSG_RESULT(yes)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
+ else
+ AC_MSG_RESULT(no)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=no
+ #
+ if test -n "$2"
+ then
+ AC_MSG_ERROR(failed to find required module $1)
+ exit 1
+ fi
+ fi
])
diff --git a/src/autom4te.cache/output.0 b/src/autom4te.cache/output.0
index 8691db3..862ea80 100644
--- a/src/autom4te.cache/output.0
+++ b/src/autom4te.cache/output.0
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.2.
+@%:@ Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.3.
@%:@
@%:@
@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,13 +576,14 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Octave-Forge symbolic package'
PACKAGE_TARNAME='octave-forge-symbolic-package'
-PACKAGE_VERSION='2.2.2'
-PACKAGE_STRING='Octave-Forge symbolic package 2.2.2'
+PACKAGE_VERSION='2.2.3'
+PACKAGE_STRING='Octave-Forge symbolic package 2.2.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_subst_vars='AWK
PYTHON
+SORT
target_alias
host_alias
build_alias
@@ -1168,7 +1169,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Octave-Forge symbolic package 2.2.2 to adapt to many kinds of systems.
+\`configure' configures Octave-Forge symbolic package 2.2.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1230,7 +1231,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.2:";;
+ short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.3:";;
esac
cat <<\_ACEOF
@@ -1297,7 +1298,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Octave-Forge symbolic package configure 2.2.2
+Octave-Forge symbolic package configure 2.2.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1314,7 +1315,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Octave-Forge symbolic package $as_me 2.2.2, which was
+It was created by Octave-Forge symbolic package $as_me 2.2.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1663,6 +1664,61 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+## Window users seem to often have their path misconfigured (issue #236)
+## so we check if we really are running GNU sort
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SORT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU coreutils" >&5
+$as_echo_n "checking for GNU coreutils... " >&6; }
+$SORT --version 2>/dev/null | grep -q GNU
+if test $? -ne 0;
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "The sort program is not GNU sort. Please configure your PATH" "$LINENO" 5
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
# Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1710,32 +1766,37 @@ fi
if test -z $PYTHON;
then
- PYTHON="python"
+ if test -z "";
+ then
+ PYTHON="python3"
+ else
+ PYTHON=""
+ fi
fi
PYTHON_NAME=`basename $PYTHON`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: sympy" >&5
$as_echo_n "checking $PYTHON_NAME module: sympy... " >&6; }
- $PYTHON -c "import sympy" 2>/dev/null
- if test $? -eq 0;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $PYTHON -c "import sympy" 2>/dev/null
+ if test $? -eq 0;
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- eval HAVE_PYMOD_SYMPY=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ eval HAVE_PYMOD_SYMPY=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- eval HAVE_PYMOD_SYMPY=no
- #
- if test -n "fatal"
- then
- as_fn_error $? "failed to find required module sympy" "$LINENO" 5
- exit 1
- fi
- fi
+ eval HAVE_PYMOD_SYMPY=no
+ #
+ if test -n "fatal"
+ then
+ as_fn_error $? "failed to find required module sympy" "$LINENO" 5
+ exit 1
+ fi
+ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for SymPy version" >&5
-$as_echo_n "checking checking for SymPy version... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SymPy version" >&5
+$as_echo_n "checking for SymPy version... " >&6; }
min_sympy_version='0.7.5'
version=`$PYTHON -c "import sympy; print(sympy.__version__)" 2>/dev/null`
if test $? -eq 0; then
diff --git a/src/autom4te.cache/output.1 b/src/autom4te.cache/output.1
index 8691db3..862ea80 100644
--- a/src/autom4te.cache/output.1
+++ b/src/autom4te.cache/output.1
@@ -1,6 +1,6 @@
@%:@! /bin/sh
@%:@ Guess values for system-dependent variables and create Makefiles.
-@%:@ Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.2.
+@%:@ Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.3.
@%:@
@%:@
@%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,13 +576,14 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Octave-Forge symbolic package'
PACKAGE_TARNAME='octave-forge-symbolic-package'
-PACKAGE_VERSION='2.2.2'
-PACKAGE_STRING='Octave-Forge symbolic package 2.2.2'
+PACKAGE_VERSION='2.2.3'
+PACKAGE_STRING='Octave-Forge symbolic package 2.2.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_subst_vars='AWK
PYTHON
+SORT
target_alias
host_alias
build_alias
@@ -1168,7 +1169,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Octave-Forge symbolic package 2.2.2 to adapt to many kinds of systems.
+\`configure' configures Octave-Forge symbolic package 2.2.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1230,7 +1231,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.2:";;
+ short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.3:";;
esac
cat <<\_ACEOF
@@ -1297,7 +1298,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Octave-Forge symbolic package configure 2.2.2
+Octave-Forge symbolic package configure 2.2.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1314,7 +1315,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Octave-Forge symbolic package $as_me 2.2.2, which was
+It was created by Octave-Forge symbolic package $as_me 2.2.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1663,6 +1664,61 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+## Window users seem to often have their path misconfigured (issue #236)
+## so we check if we really are running GNU sort
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SORT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU coreutils" >&5
+$as_echo_n "checking for GNU coreutils... " >&6; }
+$SORT --version 2>/dev/null | grep -q GNU
+if test $? -ne 0;
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "The sort program is not GNU sort. Please configure your PATH" "$LINENO" 5
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
# Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1710,32 +1766,37 @@ fi
if test -z $PYTHON;
then
- PYTHON="python"
+ if test -z "";
+ then
+ PYTHON="python3"
+ else
+ PYTHON=""
+ fi
fi
PYTHON_NAME=`basename $PYTHON`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: sympy" >&5
$as_echo_n "checking $PYTHON_NAME module: sympy... " >&6; }
- $PYTHON -c "import sympy" 2>/dev/null
- if test $? -eq 0;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $PYTHON -c "import sympy" 2>/dev/null
+ if test $? -eq 0;
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- eval HAVE_PYMOD_SYMPY=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ eval HAVE_PYMOD_SYMPY=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- eval HAVE_PYMOD_SYMPY=no
- #
- if test -n "fatal"
- then
- as_fn_error $? "failed to find required module sympy" "$LINENO" 5
- exit 1
- fi
- fi
+ eval HAVE_PYMOD_SYMPY=no
+ #
+ if test -n "fatal"
+ then
+ as_fn_error $? "failed to find required module sympy" "$LINENO" 5
+ exit 1
+ fi
+ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for SymPy version" >&5
-$as_echo_n "checking checking for SymPy version... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SymPy version" >&5
+$as_echo_n "checking for SymPy version... " >&6; }
min_sympy_version='0.7.5'
version=`$PYTHON -c "import sympy; print(sympy.__version__)" 2>/dev/null`
if test $? -eq 0; then
diff --git a/src/autom4te.cache/requests b/src/autom4te.cache/requests
index 7c5c763..db63127 100644
--- a/src/autom4te.cache/requests
+++ b/src/autom4te.cache/requests
@@ -18,21 +18,21 @@
'configure.ac'
],
{
- 'AC_DEFUN_ONCE' => 1,
- 'm4_pattern_allow' => 1,
- 'AC_CONFIG_MACRO_DIR' => 1,
- 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ 'AC_PYTHON_MODULE' => 1,
'AX_COMPARE_VERSION' => 1,
- 'AX_PYTHON_MODULE' => 1,
+ 'AU_DEFUN' => 1,
'_AM_CONFIG_MACRO_DIRS' => 1,
- 'include' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AX_PYTHON_MODULE' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'm4_pattern_forbid' => 1,
'AC_DEFUN' => 1,
- 'AC_PYTHON_MODULE' => 1,
+ 'include' => 1,
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
'_m4_warn' => 1,
- 'm4_pattern_forbid' => 1,
- 'AU_DEFUN' => 1,
- 'm4_include' => 1,
- '_AM_AUTOCONF_VERSION' => 1
+ 'm4_include' => 1
}
], 'Autom4te::Request' ),
bless( [
@@ -47,63 +47,63 @@
'configure.ac'
],
{
- 'AM_MAKEFILE_INCLUDE' => 1,
- 'AC_CANONICAL_HOST' => 1,
+ 'AC_FC_SRCEXT' => 1,
+ 'LT_INIT' => 1,
'AC_LIBSOURCE' => 1,
+ 'AM_PROG_AR' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ '_m4_warn' => 1,
+ 'AM_PROG_F77_C_O' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AM_PATH_GUILE' => 1,
+ 'AC_INIT' => 1,
+ '_AM_COND_ELSE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
- 'LT_SUPPORTED_TAG' => 1,
- 'sinclude' => 1,
- '_AM_COND_ENDIF' => 1,
- 'LT_CONFIG_LTDL_DIR' => 1,
- 'AC_REQUIRE_AUX_FILE' => 1,
- 'AM_PROG_CXX_C_O' => 1,
'AM_AUTOMAKE_VERSION' => 1,
- 'AH_OUTPUT' => 1,
- 'AC_FC_PP_SRCEXT' => 1,
- '_AM_MAKEFILE_INCLUDE' => 1,
- 'AM_NLS' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
'AC_CANONICAL_TARGET' => 1,
- '_LT_AC_TAGCONFIG' => 1,
- 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
- 'AC_CONFIG_FILES' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
- 'AC_FC_PP_DEFINE' => 1,
- 'AM_PROG_F77_C_O' => 1,
- 'AM_XGETTEXT_OPTION' => 1,
- 'AM_GNU_GETTEXT' => 1,
- 'm4_include' => 1,
+ 'include' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
+ 'AM_CONDITIONAL' => 1,
'AM_PROG_CC_C_O' => 1,
- 'LT_INIT' => 1,
- 'AM_SILENT_RULES' => 1,
- '_AM_COND_IF' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
'AM_PROG_MOC' => 1,
- 'include' => 1,
- 'AM_PROG_AR' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- 'AM_POT_TOOLS' => 1,
- 'AC_CONFIG_HEADERS' => 1,
- 'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_BUILD' => 1,
- 'AC_PROG_LIBTOOL' => 1,
- 'm4_pattern_forbid' => 1,
- 'AM_ENABLE_MULTILIB' => 1,
- 'm4_pattern_allow' => 1,
- 'AM_PATH_GUILE' => 1,
- 'AM_PROG_FC_C_O' => 1,
+ 'AM_SILENT_RULES' => 1,
'AC_FC_FREEFORM' => 1,
- 'AC_CONFIG_LINKS' => 1,
- 'AC_SUBST_TRACE' => 1,
- 'AM_CONDITIONAL' => 1,
- 'm4_sinclude' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'm4_sinclude' => 1,
+ 'AM_PROG_FC_C_O' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ '_AM_MAKEFILE_INCLUDE' => 1,
+ 'sinclude' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
'AC_SUBST' => 1,
- 'AC_INIT' => 1,
+ 'AC_SUBST_TRACE' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ '_AM_COND_IF' => 1,
+ 'm4_include' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'AM_NLS' => 1,
+ 'AM_MAKEFILE_INCLUDE' => 1,
+ '_AM_COND_ENDIF' => 1,
'AM_MAINTAINER_MODE' => 1,
- '_AM_COND_ELSE' => 1,
- '_m4_warn' => 1
+ 'AC_FC_PP_DEFINE' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_POT_TOOLS' => 1
}
], 'Autom4te::Request' )
);
diff --git a/src/autom4te.cache/traces.0 b/src/autom4te.cache/traces.0
index d1855d8..683b30b 100644
--- a/src/autom4te.cache/traces.0
+++ b/src/autom4te.cache/traces.0
@@ -91,32 +91,37 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
m4_ifvaln([$5],[else $5])dnl
fi
])
-m4trace:/usr/share/aclocal/ax_python_module.m4:26: -1- AU_DEFUN([AC_PYTHON_MODULE], [m4_if($#, 0, [AX_PYTHON_MODULE], [AX_PYTHON_MODULE($@)])])
-m4trace:/usr/share/aclocal/ax_python_module.m4:26: -1- AC_DEFUN([AC_PYTHON_MODULE], [AC_DIAGNOSE([obsolete], [The macro `AC_PYTHON_MODULE' is obsolete.
+m4trace:/usr/share/aclocal/ax_python_module.m4:28: -1- AU_DEFUN([AC_PYTHON_MODULE], [m4_if($#, 0, [AX_PYTHON_MODULE], [AX_PYTHON_MODULE($@)])])
+m4trace:/usr/share/aclocal/ax_python_module.m4:28: -1- AC_DEFUN([AC_PYTHON_MODULE], [AC_DIAGNOSE([obsolete], [The macro `AC_PYTHON_MODULE' is obsolete.
You should run autoupdate.])dnl
m4_if($#, 0, [AX_PYTHON_MODULE], [AX_PYTHON_MODULE($@)])])
-m4trace:/usr/share/aclocal/ax_python_module.m4:27: -1- AC_DEFUN([AX_PYTHON_MODULE], [
+m4trace:/usr/share/aclocal/ax_python_module.m4:29: -1- AC_DEFUN([AX_PYTHON_MODULE], [
if test -z $PYTHON;
then
- PYTHON="python"
+ if test -z "$3";
+ then
+ PYTHON="python3"
+ else
+ PYTHON="$3"
+ fi
fi
PYTHON_NAME=`basename $PYTHON`
AC_MSG_CHECKING($PYTHON_NAME module: $1)
- $PYTHON -c "import $1" 2>/dev/null
- if test $? -eq 0;
- then
- AC_MSG_RESULT(yes)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
- else
- AC_MSG_RESULT(no)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=no
- #
- if test -n "$2"
- then
- AC_MSG_ERROR(failed to find required module $1)
- exit 1
- fi
- fi
+ $PYTHON -c "import $1" 2>/dev/null
+ if test $? -eq 0;
+ then
+ AC_MSG_RESULT(yes)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
+ else
+ AC_MSG_RESULT(no)
+ eval AS_TR_CPP(HAVE_PYMOD_$1)=no
+ #
+ if test -n "$2"
+ then
+ AC_MSG_ERROR(failed to find required module $1)
+ exit 1
+ fi
+ fi
])
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
@@ -169,9 +174,10 @@ m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$])
m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$])
m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$])
-m4trace:configure.ac:4: -1- m4_pattern_allow([^PYTHON$])
-m4trace:configure.ac:9: -1- AX_PYTHON_MODULE([sympy], [fatal])
-m4trace:configure.ac:20: -1- AX_COMPARE_VERSION([$version], [ge], [$min_sympy_version], [], [
+m4trace:configure.ac:6: -1- m4_pattern_allow([^SORT$])
+m4trace:configure.ac:17: -1- m4_pattern_allow([^PYTHON$])
+m4trace:configure.ac:22: -1- AX_PYTHON_MODULE([sympy], [fatal])
+m4trace:configure.ac:33: -1- AX_COMPARE_VERSION([$version], [ge], [$min_sympy_version], [], [
AC_MSG_ERROR(SymPy version $min_sympy_version or later is required)
])
-m4trace:configure.ac:20: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:33: -1- m4_pattern_allow([^AWK$])
diff --git a/src/autom4te.cache/traces.1 b/src/autom4te.cache/traces.1
index 2b160da..8997d2a 100644
--- a/src/autom4te.cache/traces.1
+++ b/src/autom4te.cache/traces.1
@@ -1,4 +1,4 @@
-m4trace:configure.ac:2: -1- AC_INIT([Octave-Forge symbolic package], [2.2.2])
+m4trace:configure.ac:2: -1- AC_INIT([Octave-Forge symbolic package], [2.2.3])
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
@@ -146,9 +146,12 @@ m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$])
m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
m4trace:configure.ac:2: -1- AC_SUBST_TRACE([target_alias])
m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$])
-m4trace:configure.ac:4: -1- AC_SUBST([PYTHON])
-m4trace:configure.ac:4: -1- AC_SUBST_TRACE([PYTHON])
-m4trace:configure.ac:4: -1- m4_pattern_allow([^PYTHON$])
-m4trace:configure.ac:20: -1- AC_SUBST([AWK])
-m4trace:configure.ac:20: -1- AC_SUBST_TRACE([AWK])
-m4trace:configure.ac:20: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:6: -1- AC_SUBST([SORT])
+m4trace:configure.ac:6: -1- AC_SUBST_TRACE([SORT])
+m4trace:configure.ac:6: -1- m4_pattern_allow([^SORT$])
+m4trace:configure.ac:17: -1- AC_SUBST([PYTHON])
+m4trace:configure.ac:17: -1- AC_SUBST_TRACE([PYTHON])
+m4trace:configure.ac:17: -1- m4_pattern_allow([^PYTHON$])
+m4trace:configure.ac:33: -1- AC_SUBST([AWK])
+m4trace:configure.ac:33: -1- AC_SUBST_TRACE([AWK])
+m4trace:configure.ac:33: -1- m4_pattern_allow([^AWK$])
diff --git a/src/configure b/src/configure
index 246a486..ac82257 100755
--- a/src/configure
+++ b/src/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.2.
+# Generated by GNU Autoconf 2.69 for Octave-Forge symbolic package 2.2.3.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,13 +576,14 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Octave-Forge symbolic package'
PACKAGE_TARNAME='octave-forge-symbolic-package'
-PACKAGE_VERSION='2.2.2'
-PACKAGE_STRING='Octave-Forge symbolic package 2.2.2'
+PACKAGE_VERSION='2.2.3'
+PACKAGE_STRING='Octave-Forge symbolic package 2.2.3'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
ac_subst_vars='AWK
PYTHON
+SORT
target_alias
host_alias
build_alias
@@ -1168,7 +1169,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Octave-Forge symbolic package 2.2.2 to adapt to many kinds of systems.
+\`configure' configures Octave-Forge symbolic package 2.2.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1230,7 +1231,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.2:";;
+ short | recursive ) echo "Configuration of Octave-Forge symbolic package 2.2.3:";;
esac
cat <<\_ACEOF
@@ -1297,7 +1298,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Octave-Forge symbolic package configure 2.2.2
+Octave-Forge symbolic package configure 2.2.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1314,7 +1315,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Octave-Forge symbolic package $as_me 2.2.2, which was
+It was created by Octave-Forge symbolic package $as_me 2.2.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -1663,6 +1664,61 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+## Window users seem to often have their path misconfigured (issue #236)
+## so we check if we really are running GNU sort
+# Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SORT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU coreutils" >&5
+$as_echo_n "checking for GNU coreutils... " >&6; }
+$SORT --version 2>/dev/null | grep -q GNU
+if test $? -ne 0;
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "The sort program is not GNU sort. Please configure your PATH" "$LINENO" 5
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
# Extract the first word of "python", so it can be a program name with args.
set dummy python; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -1710,32 +1766,37 @@ fi
if test -z $PYTHON;
then
- PYTHON="python"
+ if test -z "";
+ then
+ PYTHON="python3"
+ else
+ PYTHON=""
+ fi
fi
PYTHON_NAME=`basename $PYTHON`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: sympy" >&5
$as_echo_n "checking $PYTHON_NAME module: sympy... " >&6; }
- $PYTHON -c "import sympy" 2>/dev/null
- if test $? -eq 0;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $PYTHON -c "import sympy" 2>/dev/null
+ if test $? -eq 0;
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- eval HAVE_PYMOD_SYMPY=yes
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ eval HAVE_PYMOD_SYMPY=yes
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- eval HAVE_PYMOD_SYMPY=no
- #
- if test -n "fatal"
- then
- as_fn_error $? "failed to find required module sympy" "$LINENO" 5
- exit 1
- fi
- fi
+ eval HAVE_PYMOD_SYMPY=no
+ #
+ if test -n "fatal"
+ then
+ as_fn_error $? "failed to find required module sympy" "$LINENO" 5
+ exit 1
+ fi
+ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for SymPy version" >&5
-$as_echo_n "checking checking for SymPy version... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SymPy version" >&5
+$as_echo_n "checking for SymPy version... " >&6; }
min_sympy_version='0.7.5'
version=`$PYTHON -c "import sympy; print(sympy.__version__)" 2>/dev/null`
if test $? -eq 0; then
diff --git a/src/configure.ac b/src/configure.ac
index 4f2c630..02d7c90 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1,5 +1,18 @@
AC_PREREQ([2.67])
-AC_INIT([Octave-Forge symbolic package], [2.2.2])
+AC_INIT([Octave-Forge symbolic package], [2.2.3])
+
+## Window users seem to often have their path misconfigured (issue #236)
+## so we check if we really are running GNU sort
+AC_PATH_PROG(SORT, sort)
+AC_MSG_CHECKING(for GNU coreutils)
+$SORT --version 2>/dev/null | grep -q GNU
+if test $? -ne 0;
+then
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([The sort program is not GNU sort. Please configure your PATH])
+else
+ AC_MSG_RESULT(yes)
+fi
AC_PATH_PROG(PYTHON, python)
if test -z $PYTHON; then
@@ -8,7 +21,7 @@ fi
AX_PYTHON_MODULE(sympy, fatal)
-AC_MSG_CHECKING(checking for SymPy version)
+AC_MSG_CHECKING(for SymPy version)
min_sympy_version='0.7.5'
version=`$PYTHON -c "import sympy; print(sympy.__version__)" 2>/dev/null`
if test $? -eq 0; then
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-symbolic.git
More information about the Pkg-octave-commit
mailing list