INSTALL.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
  7. <title>Installation of processing</title>
  8. <link rel="stylesheet" href="html4css1.css" type="text/css" />
  9. </head>
  10. <body>
  11. <div class="document" id="installation-of-processing">
  12. <h1 class="title">Installation of processing</h1>
  13. <p>Versions earlier than Python 2.4 are not supported. If you are using
  14. Python 2.4 then you should install the <tt class="docutils literal"><span class="pre">ctypes</span></tt> package (which comes
  15. automatically with Python 2.5).</p>
  16. <p>Windows binary builds for Python 2.4 and Python 2.5 are available at</p>
  17. <blockquote>
  18. <a class="reference" href="http://pyprocessing.berlios.de">http://pyprocessing.berlios.de</a></blockquote>
  19. <p>or</p>
  20. <blockquote>
  21. <a class="reference" href="http://pypi.python.org/pypi/processing">http://pypi.python.org/pypi/processing</a></blockquote>
  22. <p>Otherwise, if you have the correct C compiler setup then the source
  23. distribution can be installed the usual way:</p>
  24. <pre class="literal-block">
  25. python setup.py install
  26. </pre>
  27. <p>It should not be necessary to do any editing of <tt class="docutils literal"><span class="pre">setup.py</span></tt> if you are
  28. using Windows, Mac OS X or Linux. On other unices it may be necessary
  29. to modify the values of the <tt class="docutils literal"><span class="pre">macros</span></tt> dictionary or <tt class="docutils literal"><span class="pre">libraries</span></tt> list.
  30. The section to modify reads</p>
  31. <pre class="literal-block">
  32. else:
  33. macros = dict(
  34. HAVE_SEM_OPEN=1,
  35. HAVE_SEM_TIMEDWAIT=1,
  36. HAVE_FD_TRANSFER=1
  37. )
  38. libraries = ['rt']
  39. </pre>
  40. <p>More details can be found in the comments in <tt class="docutils literal"><span class="pre">setup.py</span></tt>.</p>
  41. <p>Note that if you use <tt class="docutils literal"><span class="pre">HAVE_SEM_OPEN=0</span></tt> then support for posix
  42. semaphores will not been compiled in, and then many of the functions
  43. in the <tt class="docutils literal"><span class="pre">processing</span></tt> namespace like <tt class="docutils literal"><span class="pre">Lock()</span></tt>, <tt class="docutils literal"><span class="pre">Queue()</span></tt> or will not be
  44. available. However, one can still create a manager using <tt class="docutils literal"><span class="pre">manager</span> <span class="pre">=</span>
  45. <span class="pre">processing.Manager()</span></tt> and then do <tt class="docutils literal"><span class="pre">lock</span> <span class="pre">=</span> <span class="pre">manager.Lock()</span></tt> etc.</p>
  46. <div class="section">
  47. <h1><a id="running-tests" name="running-tests">Running tests</a></h1>
  48. <p>To run the test scripts using Python 2.5 do</p>
  49. <pre class="literal-block">
  50. python -m processing.tests
  51. </pre>
  52. <p>and on Python 2.4 do</p>
  53. <pre class="literal-block">
  54. python -c &quot;from processing.tests import main; main()&quot;
  55. </pre>
  56. <p>This will run a number of test scripts using both processes and threads.</p>
  57. </div>
  58. </div>
  59. </body>
  60. </html>