wiki:pkg-python/Python27

Version 5 (modified by maphew, 12 years ago) ( diff )

make version independent; move manual steps out of code block

Making a Python 2.7 package for OSGeo4W

Some rough notes for how I built a python 2.7 package.

Open a command shell and

set ver=2.7.2

:: install py27 from standard 32bit msi installer (outside o4w)
wget http://www.python.org/ftp/python/%ver%/python-%ver%.msi
start python-%ver%.msi

cd d:\o4w-packages\python
mkdir python-%ver%
cd python-%ver%
mkdir apps bin etc

Manually compare c:\python27 to previous o4w python installs, then reflect the structure

xcopy /s c:\python27 apps\Python27
move apps\Python27\*.exe bin\

if exist %windir%\SysWOW64\python27.dll copy %windir%\SysWOW64\python27.dll bin\
if exist %windir%\System32\python27.dll copy %windir%\System32\python27.dll bin\

Manually add batch files for etc\ini, etc\postinstall, & bin from skeleton.

Now create the package archive

:: append o4w package version
set ver=%ver%-1

7z a -ttar python-%ver%.tar apps bin etc
7z a -tbzip2 -mx9 -mmt=on python-%ver%.tar.bz2 python-%ver%.tar

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.