Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 42620103d8ee8a2d972d3103bad0ab73 > files > 383

waf-1.5.19-1.fc14.noarch.rpm

::
:: win32 support file: allow running pythons scripts as binary 
::
:: run from package source root 
:: 
:: another solution may be http://mail.python.org/pipermail/python-list/1999-December/018772.html
:: or http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/366355
:: 
@echo off

if not defined PYTHON (
	if exist "\PYTHON24\python.exe" (
		set PYTHON=\Python24
		echo PYTHON installation found unter: %PYTHON%
	)	else (
		if exist "c:\PYTHON24\python.exe" (
			set PYTHON=c:\Python24
			echo PYTHON installation found unter: %PYTHON%
		)
	)
)

if not "%PYTHON%"=="" (
	assoc .py=Python.File
	ftype Python.File=%PYTHON%\python.exe "%%1" %%*
	set PATHEXT=%PATHEXT%;.py

	set PATH=%CD%;%CD%\utils;%PATH%
	echo ...
	echo now you can start any python script from waf 


) else (
	echo please set PYTHON environment variable to your python installation
)