wiki:pkg-python/Python27

Version 8 (modified by maphew, 13 years ago) ( diff )

use tar instead of 7zip until #101 fixed

Making a Python 2.7 package for OSGeo4W

Recipe for building a python package.

Open a command shell and

set vv=27
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

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

:: Add batch files for `etc\ini`, `etc\postinstall`, & `bin` from skeleton
xcopy /s ..\python-skeleton\* .\

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

xcopy /s c:\python%vv% apps\Python%vv%
move apps\Python%vv%\*.exe bin\

Now create the package archive

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

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

Note: until #101 is fixed again, use tar from msys package instead of 7zip:

%osgeo4w_root%\apps\msys\bin\tar.exe cvjf ..\python-%ver%.tar apps bin etc

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.