J'espère que ce sera le bon endroit pour poser cette question:gVim avec Python Compiler 3 soutien
Je suis en train de compiler gVim avec le support de Python 3 en utilisant Cygwin sous Windows:
J'ai changé le Make_cyg.mak section fichiers Python à ce qui suit:
##############################
# DYNAMIC_PYTHON=yes works.
# DYNAMIC_PYTHON=no does not (unresolved externals on link).
##############################
ifdef PYTHON
DEFINES += -DFEAT_PYTHON
INCLUDES += -I$(PYTHON)/include
EXTRA_OBJS += $(OUTDIR)/if_python.o
ifndef DYNAMIC_PYTHON
DYNAMIC_PYTHON = yes
endif
ifndef PYTHON_VER
PYTHON_VER = 30
endif
ifeq (yes, $(DYNAMIC_PYTHON))
DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
else
EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib
endif
endif
Cependant lors de l'exécution:
$ make -f Make_cyg.mak OLE=Yes PYTHON=/cygdrive/p/Applications/PortablePython_1.1_py3.0.1/App/ RUBY=/cygdrive/c/Programme/Ruby/
cela se traduit par les erreurs suivantes:
In file included from /cygdrive/p/Applications/PortablePython_1.1_py3.0.1/App//i
nclude/Python.h:70,
from if_python.c:43:
/cygdrive/p/Applications/PortablePython_1.1_py3.0.1/App//include/bytesobject.h:1
04:1: warning: "F_BLANK" redefined
In file included from globals.h:1554,
from vim.h:1831,
from if_python.c:20:
farsi.h:74:1: warning: this is the location of the previous definition
if_python.c:729: warning: initialization makes integer from pointer without a ca
st
if_python.c:733: warning: initialization from incompatible pointer type
if_python.c:734: warning: initialization from incompatible pointer type
if_python.c:735: warning: initialization from incompatible pointer type
if_python.c:737: error: `cmpfunc' undeclared here (not in a function)
if_python.c:737: error: initializer element is not constant
if_python.c:737: error: (near initialization for `OutputType.tp_repr')
if_python.c:737: error: parse error before numeric constant
/** more errors **/
if_python.c:2256: warning: initialization from incompatible pointer type
if_python.c:2257: warning: initialization from incompatible pointer type
if_python.c: In function `PythonMod_Init':
if_python.c:2351: error: structure has no member named `ob_type'
if_python.c:2352: error: structure has no member named `ob_type'
if_python.c:2353: error: structure has no member named `ob_type'
if_python.c:2354: error: structure has no member named `ob_type'
if_python.c:2355: error: structure has no member named `ob_type'
if_python.c:2356: error: structure has no member named `ob_type'
make: *** [gobj/if_python.o] Error 1
J'utilise un python portable installer à partir Portable Python. Je ne sais pas si cela peut être la source de l'erreur.
J'espère que quelqu'un sait comment compiler vim avec le support de python 3 (si je le compile seulement avec le support ruby il compile bien).
Merci à l'avance,
Gjallar
Salut, Je tente de le compiler avec Portable Python comme je veux utiliser l'exe résultant avec mon portable gVim aussi. Vous devez compiler vim avec PYTHON et RUBY pour accéder aux fonctions d'auto-complétion de ces langues. (Je pense au moins - je suis nouveau à vim) Dans le cas de la compilation de vim avec juste RUBY il fonctionne bien avec la nouvelle fonctionnalité d'auto-complétion vim. Comme je voulais apprendre Python 3, je pensais que ce serait bien de pouvoir utiliser vim avec mon portable python 3 (qui n'existe pas pour Python 3.1 actuellement). Espérons que cette information est utile et merci d'avoir pris le temps de m'aider. - Gjallar – BergmannF
Je ne pense pas que la version de python avec laquelle vous le compilez fera la différence pour la fonction d'auto-complétion.Je ne sais pas comment fonctionne la fonctionnalité d'auto-complétion dans vim, mais le support de Python 3 est très probablement complètement indépendant de la version de Python avec laquelle vous l'avez compilé. La fonctionnalité d'auto-complétion ne fait pas partie de Python, mais de vim. –
@Gjallar: En outre, vous voulez certainement utiliser Python 3.1. En bref, je ne vois pas pourquoi vous n'utiliseriez pas la version standard de vim compilée pour Windows. Vous essayez probablement de résoudre le mauvais problème. –