Created
October 16, 2010 06:27
-
-
Save nzjrs/629505 to your computer and use it in GitHub Desktop.
Script for building the Py{GObject,GTK} installers using MinGW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script for building the Py{GObject,GTK} installers using MinGW | |
# via wine on ubuntu 10.04 | |
#Install the deps, MinGW and MSYS. GCC 4.5.0 | |
#wine mingw-get.exe install gcc | |
#wine mingw-get.exe install msys-base | |
PYVERSIONS="6 7" | |
BDIST_TARGETS="wininst msi" | |
PYGOBJECT_VERSION=2.26.0 | |
PYGTK_VERSION=2.22.0 | |
rm -rf {pygobject.git,pycairo-1.8.10,pygtk.git}/dist/ | |
for pyver in $PYVERSIONS; do | |
for bdist in $BDIST_TARGETS; do | |
if [ ${bdist} = "wininst" ] ; then | |
build_opt=--user-access-control=auto | |
else | |
build_opt= | |
fi | |
echo "============== Python2.${pyver} bdist_${bdist}" | |
#PyGObject | |
cd pygobject.git && rm -rf build/ | |
cat .git/HEAD | grep -q windows || exit 1 | |
wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported bdist_${bdist} ${build_opt} | |
test ${bdist} = "wininst" && wine dist/pygobject-$PYGOBJECT_VERSION.win32-py2.${pyver}.exe | |
cd ../ | |
#PyCairo | |
cd pycairo-1.8.10 && rm -rf build/ | |
patch -N -i fix-install-path.patch | |
wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 bdist_${bdist} ${build_opt} | |
test ${bdist} = "wininst" && wine dist/pycairo-1.8.10.win32-py2.${pyver}.exe | |
cd ../ | |
#PyGTK | |
cd pygtk.git && rm -rf build/ | |
cat .git/HEAD | grep -q windows || exit 1 | |
PKG_CONFIG_PATH=C:/Python2${pyver}/Lib/pkgconfig/ wine C:\\Python2${pyver}\\python.exe setup.py build --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported bdist_${bdist} ${build_opt} | |
test ${bdist} = "wininst" && wine dist/pygtk-$PYGTK_VERSION.win32-py2.${pyver}.exe | |
wine C:\\Python2${pyver}\\python.exe examples/pygtk-demo/pygtk-demo.py | |
cd ../ | |
done | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- setup.py.orig 2010-10-16 18:00:18.000000000 +1300 | |
+++ setup.py 2010-10-16 17:59:40.000000000 +1300 | |
@@ -110,7 +110,7 @@ | |
data_files = [ | |
('include/pycairo', ['src/pycairo.h']), | |
('lib/pkgconfig', [pkgconfig_file]), | |
- (os.path.join(dsy.get_python_lib(), 'cairo'), | |
+ ('lib/site-packages/cairo', | |
['src/__init__.py']), | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment