Re: aap build problem
Bram Moolenaar <[email protected]> Thu, 04 Mar 2004 12:10:40 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Jacob Lerner wrote:
> I have lots of computers (Linux) with python 1.5.2 installed.
> I cannot upgrade python or OS because this may conflict with other
> uses of pyhton on these computers.
No problem, Aap should work with Python 1.5.2.
> aap installation fails (aap 1.0.57).
> Compiling /usr/local/lib/aap/Exec-1.057/aapre.py ...
> File "/usr/local/lib/aap/Exec-1.057/aapre.py",
> line 513
> self.code = pcre_compile(*statetuple)
> ^
> SyntaxError: invalid syntax
>
> aap download/install page has no mention of python version required.
You can ignore this error. The aapre.py module is only used for Python
2.3. This is a trick: we need the old pre.py module (it's twenty times
faster than the new one) but the Python 2.3 version gives a warning
message. Thus I made a copy with the warning message removed.
> Is it possible that aap be fixed to work around python
> differences and to install/work with pythoin 1.5.2 ?
It appears that installing continued after the error message. Did you
try running Aap? I would guess it just works.
Anyway, this change to Exec/main.aap should fix the problem:
RCS file: /cvsroot/a-a-p/Exec/main.aap,v
retrieving revision 1.29
diff -u -r1.29 main.aap
--- main.aap 1 Feb 2004 15:30:54 -0000 1.29
+++ main.aap 4 Mar 2004 10:17:50 -0000
@@ -103,9 +103,15 @@
# Compile *.py files into *.pyc. This must be done after copying,
# otherwise they won't be used.
+ # Trick: Only compile aapre.py with Python 2.3, otherwise it generates
+ # an error message.
@if not skipbuild():
@import compileall
+ @if sys.version[0] != '2' or sys.version[2] != "3":
+ :move $dir/aapre.py $dir/aapre.py.not
@compileall.compile_dir(dir, 1)
+ @if sys.version[0] != '2' or sys.version[2] != "3":
+ :move $dir/aapre.py.not $dir/aapre.py
# Create symbolic links for the program.
:print Creating a symbolic link for "aap" in $bindir
--
Lose weight, NEVER Diet again with
The "Invisible Weight Loss Patch"
(spam e-mail)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click