Difference between revisions of "Python"
From WPKG | Open Source Software Deployment and Distribution
(Quick update for 2.7, still needs clean up) |
|||
| Line 4: | Line 4: | ||
<source lang="xml"> | <source lang="xml"> | ||
| − | < | + | <package |
| + | id="python" | ||
| + | name="Python" | ||
| + | revision="%version%" | ||
| + | priority="50" | ||
| + | reboot="false"> | ||
| − | + | <variable name="version" value="2.7" /> | |
| − | < | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | <check type="uninstall" condition="exists" path="Python | + | <check type="uninstall" condition="exists" path="Python %version%" /> |
| − | <install cmd='msiexec /qn /i "%SOFTWARE%\python\python- | + | <install cmd='msiexec /qn /i "%SOFTWARE%\python\python-%version%.msi" ALLUSERS=1' /> |
| − | <upgrade cmd='msiexec /qn /i "%SOFTWARE%\python\python- | + | <upgrade cmd='msiexec /qn /i "%SOFTWARE%\python\python-%version%.msi" ALLUSERS=1' /> |
| − | <remove cmd='msiexec /qn /x | + | <remove cmd='msiexec /qn /x"%SOFTWARE%\python\python-%version%.msi"' /> |
| − | + | </package> | |
| − | + | ||
| − | + | ||
</source> | </source> | ||
Revision as of 23:51, 17 September 2010
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/
<package
id="python"
name="Python"
revision="%version%"
priority="50"
reboot="false">
<variable name="version" value="2.7" />
<check type="uninstall" condition="exists" path="Python %version%" />
<install cmd='msiexec /qn /i "%SOFTWARE%\python\python-%version%.msi" ALLUSERS=1' />
<upgrade cmd='msiexec /qn /i "%SOFTWARE%\python\python-%version%.msi" ALLUSERS=1' />
<remove cmd='msiexec /qn /x"%SOFTWARE%\python\python-%version%.msi"' />
</package>
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>