support psyco >= 1.4

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2178 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-01-20 21:34:37 +00:00
parent 65dbf8618c
commit 64a2d6187c
3 changed files with 44 additions and 10 deletions

View file

@ -60,6 +60,10 @@ an extra &quot;python-dev&quot; package.</p>
<li><p class="first"><em>Optional, for bash-completion:</em>
optcomplete Python module from <a class="reference" href="http://furius.ca/optcomplete/">http://furius.ca/optcomplete/</a></p>
</li>
<li><p class="first"><em>Optional (speedup for i386 compatible PCs)</em>
Psyco from <a class="reference" href="http://psyco.sourceforge.net/">http://psyco.sourceforge.net/</a>
[<a class="reference" href="http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4-src.tar.gz">http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4-src.tar.gz</a>]</p>
</li>
</ol>
</div>
<div class="section" id="requirements-for-windows">
@ -80,6 +84,9 @@ Be sure to install in the given order:<ol class="loweralpha">
[<a class="reference" href="http://osdn.dl.sourceforge.net/sourceforge/mingw/gettext-0.11.5-2003.02.01-1.exe">http://osdn.dl.sourceforge.net/sourceforge/mingw/gettext-0.11.5-2003.02.01-1.exe</a>]</li>
</ol>
</li>
<li><em>Optional (speedup for i386 compatible PCs)</em>
Psyco from <a class="reference" href="http://psyco.sourceforge.net/">http://psyco.sourceforge.net/</a>
[<a class="reference" href="http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4.win32-py2.4.exe">http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4.win32-py2.4.exe</a>]</li>
</ol>
</div>
<div class="section" id="setup-for-unix-linux-or-mac-os-x">
@ -110,6 +117,7 @@ file.</p>
documentation.</p>
</li>
</ol>
<p>If you downloaded Psyco please read the <a class="reference" href="http://psyco.sourceforge.net/psycoguide/node2.html">psyco installation docs</a>.</p>
</blockquote>
</li>
</ol>
@ -155,6 +163,7 @@ Change to the <tt class="docutils literal"><span class="pre">linkchecker-X.X.X</
<p>This generates a binary installer
<tt class="docutils literal"><span class="pre">dist\linkchecker-X.X.X.win32-py2.4.exe</span></tt> which you just have to
execute.</p>
<p>If you downloaded Psyco please read the <a class="reference" href="http://psyco.sourceforge.net/psycoguide/node2.html">psyco installation docs</a>.</p>
</li>
</ol>
</div>
@ -202,7 +211,7 @@ working</li>
</div>
<hr class="docutils footer" />
<div class="footer">
Generated on: 2005-01-11 11:18 UTC.
Generated on: 2005-01-20 21:34 UTC.
</div>
</body>
</html>

View file

@ -38,6 +38,10 @@ Requirements for Unix/Linux or Mac OS X
3. *Optional, for bash-completion:*
optcomplete Python module from http://furius.ca/optcomplete/
4. *Optional (speedup for i386 compatible PCs)*
Psyco from http://psyco.sourceforge.net/
[http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4-src.tar.gz]
Requirements for Windows
------------------------
@ -57,6 +61,10 @@ Requirements for Windows
d) gettext
[http://osdn.dl.sourceforge.net/sourceforge/mingw/gettext-0.11.5-2003.02.01-1.exe]
3. *Optional (speedup for i386 compatible PCs)*
Psyco from http://psyco.sourceforge.net/
[http://osdn.dl.sourceforge.net/sourceforge/psyco/psyco-1.4.win32-py2.4.exe]
Setup for Unix/Linux or Mac OS X
--------------------------------
@ -91,6 +99,11 @@ Setup for Unix/Linux or Mac OS X
.. _Modifying Python's search path:
http://docs.python.org/inst/search-path.html#SECTION000410000000000000000
If you downloaded Psyco please read the `psyco installation docs`_.
.. _psyco installation docs:
http://psyco.sourceforge.net/psycoguide/node2.html
Setup for Windows - the binary .exe installer:
----------------------------------------------
@ -137,6 +150,11 @@ Setup for Windows - compiling from source:
``dist\linkchecker-X.X.X.win32-py2.4.exe`` which you just have to
execute.
If you downloaded Psyco please read the `psyco installation docs`_.
.. _psyco installation docs:
http://psyco.sourceforge.net/psycoguide/node2.html
After installation
------------------

View file

@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
"""check HTML pages for broken links"""
# Copyright (C) 2000-2005 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify
@ -16,6 +15,9 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
"""
Check HTML pages for broken links.
"""
import sys
import getopt
@ -578,14 +580,19 @@ Press Ctrl-C to cancel, RETURN to continue.""") % _profile
import profile
profile.run("linkcheck.checker.check_urls(consumer)", _profile)
else:
# do not use psyco, at the moment (Oct 2003) it has bugs causing
# infinite loops when threads are enabled, and psyco disables
# the Ctrl-C break button of the Python interpreter.
#try:
# import psyco
# psyco.full()
#except ImportError:
# pass
try:
import psyco
# psyco >= 1.4.0 final is needed
if psyco.__version__ >= 0x10400f0:
psyco.profile()
else:
# warn about old psyco version
linkcheck.log.warn(linkcheck.LOG_CMDLINE,
_("""Psyco is installed but not used since the version is too old.
Psyco >= 1.4 is needed."""))
except ImportError:
# no psyco available, just ignore
pass
linkcheck.checker.check_urls(consumer)
#############################################################################