Well, sorry if I might have gotten your hopes up but unfortunately your test confirms it very clearly. I was under the impression that because I didn't got the error I got now it actually worked. But this is what happens when I try your test:
Code:
E117: Unknown function: pyeval
E15: Invalid expression: pyeval("x")
Press ENTER or type command to continue
I started checking for Port dependencies and the moment you enable Python support it immediately updates its dependencies:
Code:
root@smtp2:/usr/ports/editors/vim # make run-depends-list
/usr/ports/converters/libiconv
/usr/ports/devel/cscope
/usr/ports/devel/gettext
/usr/ports/lang/perl5.14
[B]/usr/ports/lang/python27[/B]
Needless to say, but that version is obviously installed on my server, and when checking its dependencies you can clearly see that
vim has registered itself too:
Code:
root@smtp2:/usr/ports/editors/vim # pkg_info -R python27\*
Information for python27-2.7.5:
Required by:
...
mc-4.8.8
webmin-1.630
[B]vim-7.3.1014[/B]
(I cut out some ports from the list and only kept the last part).
So, then I configured
editors/vim using
# make fetch extract patch configure
and then examined
work/vim73/src/auto/config.log (navigated from the Port directory obviously) and I discovered this:
Code:
$ auto/configure --enable-gui=no --without-x --enable-perlinterp [B]--enable-pyth
oninterp[/B] --enable-cscope --enable-multibyte --enable-fontset --enable-xim --with
-features=big --prefix=/usr/local --with-tlib=termlib --srcdir=. --cache-file=au
to/config.cache
However, when I example the output from
# ./configure --help | less
I find these options:
Code:
--enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
--enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Notice the
=OPTS? But the initial configure command (as initiated by the Ports build script, and seen in the
config.log file) doesn't supply any parameters.
So then I looked even deeper into
config.log:
Code:
configure:5202: checking --enable-pythoninterp argument
configure:5211: result: yes
configure:5218: checking for python2
configure:5236: found /usr/local/bin/python2
configure:5248: result: /usr/local/bin/python2
configure:5261: checking Python version
configure:5270: result: 2.7
configure:5273: checking Python is 1.4 or better
configure:5278: result: yep
configure:5281: checking Python's install prefix
configure:5290: result: /usr/local
configure:5293: checking Python's execution prefix
configure:5302: result: /usr/local
configure:5324: checking Python's configuration directory
configure:5341: result: /usr/local/lib/python2.7/config
configure:5400: checking if -pthread should be used
configure:5427: cc -o conftest -O2 -pipe -fno-strict-aliasing -D_THREAD_SAFE -
I/usr/local/include -Wl,-R/usr/local/lib/perl5/5.14.2/mach/CORE -L/usr/loca
l/lib conftest.c -pthread >&5
configure:5427: $? = 0
configure:5428: result: yes
configure:5443: checking if compile and link flags for Python are sane
configure:5460: cc -o conftest -O2 -pipe -fno-strict-aliasing -I/usr/local/incl
ude/python2.7 -DPYTHON_HOME=\"/usr/local\" -D_THREAD_SAFE -I/usr/local/include
-Wl,-R/usr/local/lib/perl5/5.14.2/mach/CORE -L/usr/local/lib conftest.c -p
thread -L/usr/local/lib/python2.7/config -lpython2.7 -lutil -lm -Wl,--export-dyn
amic >&5
<command-line>: warning: missing terminating " character
configure:5460: $? = 0
configure:5461: result: yes
configure:5502: checking --enable-python3interp argument
configure:5511: result: no
So it seems that Python support is really being added to
vim during compilation.
Then I turned my attention to
pyeval() itself and found
this webpage; here
pyeval v0.1.6 is being provided as a separate download.
As such I'm now wondering if it is possible that this function simply isn't part of the Python base system, thus simply not provided together with
lang/python27?
Because if that's the case then it would sure explain why
vim is unable to use this function. The reason I'm starting to conclude as such is because my
vim program does allow commands such as
:python import datetime
(as seen in my previous post) without giving any errors.
So I think that
vim does provide Python support, but Python doesn't seem to include
pyeval().