PLD-Guide python.xml,1.11,1.12
Artur Wróblewski
wrobell w tldp.org
Śro, 3 Lip 2002, 19:36:14 CEST
Module name: PLD-Guide
Changes by: wrobell
Changed RCS file: /cvsroot/LDP/guide/docbook/PLD-Guide/devel/python.xml,v
----------------------------
revision 1.12
date: 2002/07/03 17:36:10; author: wrobell; state: Exp; lines: +30 -18
- move description of py_comp and py_ocomp macros into RPM macro
description section
Index: python.xml
===================================================================
RCS file: /cvsroot/LDP/guide/docbook/PLD-Guide/devel/python.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- python.xml 3 Jul 2002 17:13:01 -0000 1.11
+++ python.xml 3 Jul 2002 17:36:10 -0000 1.12
@@ -233,26 +233,10 @@
before module installation.
</para>
<para>
- There can be much more other methods of installing Python modules.
+ There can be other methods of installing Python modules.
For example, you can be forced to install them manually. There are
two macros <literal role="rpm.macro">py_comp</literal> and <literal role="rpm.macro">py_ocomp</literal>,
- which help with installation. This macros use Python <literal role="lib">compileall</literal>
- module which scans given directory and its subdirectories for Python modules and compiles
- them into bytecode.
- <example>
- <title>
- Compiling Python modules into bytecode.
- </title>
- <screen>%install
-...
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}</screen>
- </example>
- Please note, that compilation must be performed after module source files installation, because
- the directory path, where module source files reside, is put into binary files
- during byte compilation.
- Information about correct directory path in compiled modules is useful, due to
- thrown exceptions which display it.
+ which help with installation. Look for macros descriptions below.
</para>
</section>
<section id='python.modules.groups'>
@@ -376,6 +360,34 @@
</listitem>
</varlistentry>
</variablelist>
+ </para>
+ <para>
+ Most of above macros are self explanatory... and some not, sore read on. :-)
+ </para>
+ <para>
+ Macros <literal role="rpm.macro">py_comp</literal>
+ and <literal role="rpm.macro">py_ocomp</literal> should be used when
+ software installation routine does
+ not provide byte compiled modules installation.
+ </para>
+ <para>
+ The macros use Python <literal role="lib">compileall</literal>
+ module which scans given directory and its subdirectories for Python modules and compiles
+ them into bytecode.
+ <example>
+ <title>
+ Compiling Python modules into bytecode.
+ </title>
+ <screen>%install
+...
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}</screen>
+ </example>
+ Please note, that compilation must be performed after module source files installation, because
+ the directory path, where module source files reside, is put into binary files
+ during byte compilation.
+ Information about correct directory path in compiled modules is useful, due to
+ thrown exceptions which display it.
</para>
<!-- para>
more info about: py_?comp and pyrequires_eq macros
Więcej informacji o liście dyskusyjnej pld-doc