Python

From WPKG | Open Source Software Deployment and Distribution

Jump to: navigation, search

This is a silent installer for Python.

Python 2.4 and higher are available as MSI packages, which are documented at http://www.python.org/download/releases/2.5/msi/

<?xml version="1.0" encoding="UTF-8"?>
 
<packages>
  <package
    id="python"
    name="Python"
    revision="2511"
    priority="0"
    reboot="false">
 
  <check type="uninstall" condition="exists" path="Python 2.5.1"/>
 
  <install cmd='msiexec /qn /i "%SOFTWARE%\python\python-2.5.1.msi" ALLUSERS=1'/>
 
  <upgrade cmd='msiexec /qn /i "%SOFTWARE%\python\python-2.5.1.msi" ALLUSERS=1'/>
 
  <remove cmd='msiexec /qn /x{31800004-6386-4999-a519-518f2d78d8f0}'/>
 
  </package>
</packages>

For modules use easy_install, works with the most modules, download the script [1]ez_setup.py and the file distutils.cfg for config easy_install. use apache, easy_install get the files of modules (.exe, .egg):

distutils.cfg

[easy_install]
 
find_links= http://server.apache/pyeasy/
allow_hosts = *.apache

The easy_install get the modules (.exe,.egg) of apache server. The package for easy_install is:

<!--Easy Install python -->
<package
     id="pyeasyinstall"
     name="Easy Install Python"
     revision="3"
     reboot="false"
     priority="398">
    <depends package-id="python"/>
    <check type="file" condition="exists" path="C:\Python25\Scripts\easy_install.exe" />   
    <install cmd='"C:\Python25\python" %SOFTWARE%\python\ez_setup.py' />
    <install cmd='cmd /c xcopy /v /s /i /e /h /c /y /q "%SOFTWARE%\python\distutils.cfg" "C:\Python25\Lib\distutils\"' />
    <upgrade cmd='"C:\Python25\python" %SOFTWARE%\python\ez_setup.py' />
    <upgrade cmd='cmd /c xcopy /v /s /i /e /h /c /y /q "%SOFTWARE%\python\distutils.cfg" "C:\Python25\Lib\distutils\"' />
    <remove cmd='cmd /c if exist "C:\Python25\python\Scripts\easy_install.exe" del "C:\Python25\python\Scripts\easy_install.exe"' >
	<exit code="1" />
	<exit code="0" />
  </remove>
</package>

A template for the modules is:

<package
     id="pynamemodule"
     name="namemodule 2.0.1"
     revision="0"
     reboot="false"
     priority="397">
    <depends package-id="python"/>
    <depends package-id="pyeasyinstall"/>
    <check type="file" condition="exists" path="C:\Python25\Lib\site-packages\namemodule-2.0.1-py2.5-win32.egg" />
    <install cmd='"C:\Python25\Scripts\easy_install.exe" --quiet namemodule' />   
    <upgrade cmd='"C:\Python25\Scripts\easy_install.exe" --quiet --upgrade pynamemodule' />
    <remove cmd='cmd /c if exist "C:\Python25\Lib\site-packages\namemodule-2.0.1-py2.5-win32.egg" del "C:\Python25\Lib\site-packages\namemodule-2.0.1-py2.5-win32.egg"' >
	<exit code="1" />
	<exit code="0" />
    </remove>
</package>
Retrieved from "http://wpkg.org/Python"
Personal tools