Table of Content

I have own Python 2.7.5 and own mingw/gcc, want to build kivy 1.8.0 dev from source.

When you follow up instruction from section:
http://kivy.org/docs/installation/installation-windows.html
Using an exisiting Python installation (64/32 bit)

Always got gcc link failure,

C:\portableapps\mingw\bin\gcc.exe -mno-cygwin -shared -s c:\users\\appdata\local\temp\pip-tatybd-build\kivy\graphics\texture.o c:\users\\appdata\local\temp\pip-tatybd-build\kivy\graphics\texture.def -LC:\Python27\libs -LC:\Python27\PCbuild -lopengl32 -lglew32 -lpython27 -lmsvcr90 -o build\lib.win32-2.7\kivy\graphics\texture.pyd
-lm

c:\users\\appdata\local\temp\pip-tatybd-build\kivy\graphics\texture.o:texture.c:(.text+0x19): undefined reference to `__imp____glewGenFramebuffers'

c:\users\\appdata\local\temp\pip-tatybd-build\kivy\graphics\texture.o:texture.c:(.text+0x68): undefined reference to `__imp____glewIsRenderbuffer'

Finally I made it working in this way:

1) replace MingW, extract MingW folder from portable kivy package and replace your own one:
http://kivy.org/#download

2) also extract gstreamer from above package to your own Python folder

3) add gstreamer/bin to PATH,

I modified kivyenv.sh and put in own Python folder, you can source it when using kivy:

$ source kivienv.sh

more kivyenv.sh

# Script to initialize the complete dev environment
# for Kivy. Use that when you want to develop :)
#
# This will give you an access to :
# - Python binaries (python, easy_install)
# - Cython binaries (cython)
# - A correct pythonpath (Kivy)
# - Gstreamer binaries (gst-inspect, ...)
#
# Usage: source /path/to/kivyenv.sh
#

# Get root directory of portable installation
tmp=$(dirname $BASH_SOURCE)
export KIVY_PORTABLE_ROOT=$(cd $tmp; pwd)

if [ ! -d $KIVY_PORTABLE_ROOT ]; then
	echo "Usage: source /path/to/kivyenv.sh"
	exit 1
fi

# bootstrapping
echo bootstrapping Kivy @ $KIVY_PORTABLE_ROOT

if [ "X$KIVY_PATHS_INITIALIZED" != "X1" ]; then

echo Setting Environment Variables:
echo #################################

export GST_REGISTRY=$KIVY_PORTABLE_ROOT/gstreamer/registry.bin
echo GST_REGISTRY is $GST_REGISTRY
echo ----------------------------------

export GST_PLUGIN_PATH=$KIVY_PORTABLE_ROOT/gstreamer/lib/gstreamer-0.10
echo GST_PLUGIN_PATH is $GST_PLUGIN_PATH
echo ----------------------------------

export PATH=$KIVY_PORTABLE_ROOT:$KIVY_PORTABLE_ROOT/gstreamer/bin:$PATH
echo PATH is $PATH
echo ----------------------------------

export KIVY_PATHS_INITIALIZED=1
echo ##################################

fi

echo done bootstraping kivy...have fun!
echo

4) download latest kivy 1.8.0 dev from link:

https://github.com/kivy/kivy

5) install kivy 1.8.0

$ python setup.py install

6) verify kivy


$ pip list |grep -i kivy
kivy (1.8.0-dev)
Kivy-Garden (0.1.1)

$ python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import kivy
[INFO              ] Kivy v1.8.0-dev