Mercurial > parpg-core
view site_scons/site_tools/cpython/doc/reference.html @ 17:15107282d9eb
Redefined SYSCONFDIR installation path variable so that it appends APPNAME.
* Although this deviates from GNU standards this relatively minor change makes it easier to write paths that are portable to Windows.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Thu, 09 Jun 2011 21:40:51 -1000 |
parents | 4706e0194af3 |
children |
line wrap: on
line source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >SCons tool cpython - Reference</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD ><BODY CLASS="article" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="ARTICLE" ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" ><A NAME="AEN2" >SCons tool <SPAN CLASS="QUOTE" >"cpython"</SPAN > - Reference</A ></H1 ><H3 CLASS="author" ><A NAME="AEN5" >Dirk Baechle</A ></H3 ><P CLASS="pubdate" >2010-07-28<BR></P ><HR></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >1. <A HREF="#interna" >Interna</A ></DT ><DT >2. <A HREF="#AEN20" >Builders</A ></DT ><DD ><DL ><DT >2.1. <A HREF="#AEN22" >InstallPython</A ></DT ></DL ></DD ><DT >3. <A HREF="#AEN33" >Variables</A ></DT ></DL ></DIV ><BLOCKQUOTE CLASS="ABSTRACT" ><DIV CLASS="abstract" ><P ></P ><A NAME="AEN9" ></A ><P >This reference lists all the variables that are used within the <SPAN CLASS="QUOTE" >"cpython"</SPAN > tool, and the available builders. It is intended for SCons tool developers and core programmers, as a normal user you should read the manual instead.</P ><P ></P ></DIV ></BLOCKQUOTE ><DIV CLASS="section" ><HR><H2 CLASS="section" ><A NAME="interna" >1. Interna</A ></H2 ><P >Internally, the builder is based on the <TT CLASS="literal" >Install</TT >/<TT CLASS="literal" >InstallAs</TT > methods from <TT CLASS="literal" >SCons.Tool.install</TT >. It makes use of the basic builder's functions: <TT CLASS="literal" >installFunc()</TT >, and <TT CLASS="literal" >add_targets_to_INSTALLED_FILES()</TT >.</P ></DIV ><DIV CLASS="section" ><HR><H2 CLASS="section" ><A NAME="AEN20" >2. Builders</A ></H2 ><DIV CLASS="section" ><H3 CLASS="section" ><A NAME="AEN22" >2.1. InstallPython</A ></H3 ><P >The <SPAN CLASS="QUOTE" >"<TT CLASS="literal" >InstallPython</TT >"</SPAN > method creates <TT CLASS="literal" >.pyc</TT > or <TT CLASS="literal" >.pyo</TT > files for <TT CLASS="literal" >.py</TT > source files and adds them to the list of targets along with the source files. They are later copied to the destination (target) directory.</P ><P >Example:</P ><P ><PRE CLASS="screen" >env = Environment() hello = File('hello.py') env.InstallPython('/usr/local/bin/', hello) env.Alias('install', '/usr/local/bin/') </PRE ></P ></DIV ></DIV ><DIV CLASS="section" ><HR><H2 CLASS="section" ><A NAME="AEN33" >3. Variables</A ></H2 ><P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT >CPYTHON_PYC</DT ><DD ><P >Default value is <TT CLASS="literal" >1</TT >, which means that the Python source files get compiled to <TT CLASS="literal" >.pyc</TT > files. Set this variable to <TT CLASS="literal" >0</TT > in order to get optimized <TT CLASS="literal" >.pyo</TT > files, parallel to your installed sources.</P ></DD ><DT >CPYTHON_EXE</DT ><DD ><P >The path to the external Python executable, used for creating optimized <TT CLASS="literal" >.pyo</TT > files. Default value is '<TT CLASS="literal" >python</TT >'.</P ></DD ><DT >CPYTHON_PYO_FLAGS</DT ><DD ><P >Additional flags for compiling optimized Python files (<TT CLASS="literal" >.pyo</TT >). The default is '<TT CLASS="literal" >-O</TT >'.</P ></DD ><DT >CPYTHON_PYO_CMD</DT ><DD ><P >The command arguments for compiling optimized Python files (<TT CLASS="literal" >.pyo</TT >). The default value is '<TT CLASS="literal" >-c 'import sys,py_compile; [py_compile.compile(i) for i in sys.argv[1:]]'</TT >'.</P ></DD ><DT >CPYTHON_PYCOM</DT ><DD ><P >The command line for compiling optimized Python files (<TT CLASS="literal" >.pyo</TT >). Default is '<TT CLASS="literal" >$CPYTHON_EXE $CPYTHON_PYO_FLAGS $CPYTHON_PYO_CMD</TT >'.</P ></DD ><DT >CPYTHON_PYCOMSTR</DT ><DD ><P >The message string for the '<TT CLASS="literal" >CPYTHON_PYCOM</TT >' command. Default is '<TT CLASS="literal" >Install file: "$SOURCE" as "$TARGET"</TT >'.</P ></DD ><DT >CPYTHON_SUFFIX</DT ><DD ><P >Default value is '.py'. The suffix for Python source files.</P ></DD ></DL ></DIV ></P ></DIV ></DIV ></BODY ></HTML >