Monday, August 08, 2005

Ingredients for self compiling SEPY

If you are a SEPY user interested in getting the source code it can prove to be a little bit tricky, I've kept a guide for compiling SEPY from CVS on the Sephiroth.it forums up-to-date for a few months, I've decided to write these instructions up here, so there's more than one place to find them.

The instructions for compiling SEPY and getting the source from CVS, which Alessandro posted originally are out of date, and I posted the updates whenever I tried to download a significant new version and create a new source tree, third party python modules are sometimes added or updated and these are often used without notice, it's up to you to make sure these are current.

Note: These instructions are Win32/XP/2000 specific.

Get Python and modules required for SEPY

The Python binaries and modules you need to compile SEPY are as follows... (current as of 8/8/2005)

(Note: Always download the latest win32 binaries of each and install before compiling Sepy.)

python 2.4
http://www.python.org

wxPython 2.6
http://www.wxpython.org/download.php

pysqlite2
http://initd.org/tracker/pysqlite

pyRXP (xml library)
http://www.reportlab.org/pyrxp.html

pyXML
http://pyxml.sourceforge.net/

pyWin32
http://starship.python.net/crew/mhammond/win32/Downloads.html

py2exe (for build binary exe)
http://starship.python.net/crew/theller/py2exe/

4suite (utilities module)
http://4suite.org/index.xhtml

psyco (optimisation module)
http://psyco.sourceforge.net/

How to get the latest SE|PY source code via CVS.

If you know you have CVS installed on your machine, create a folder called c:\SEPYCVS and open a cmd window and type (from the C:\SEPYCVS folder)

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/sepy co .

Note: The . at the end is important!

This will get you the complete current source tree.

Note: If you don't have a command line CVS client on your machine, get CVSNT ( http://www.cvsnt.org/ )

If you prefer to use a GUI CVS client Tortoise CVS is a good choice http://www.tortoisecvs.org/

TortoiseCVS Instructions

Install TortoiseCVS and restart the PC...

To checkout SEPY to your drive

  1. Create a new folder on C:\ called SEPYCVS (c:\SEPYCVS)
  2. Right click on the folder, tortoise will have given you some new options on the context menu.
  3. Select "CVS Checkout..."
  4. Enter the following into the TortoiseCVS CVSROOT entry...
     :pserver:anonymous@cvs.sourceforge.net:/cvsroot/sepy 
    (This will fill-in most of the fields on the TortoiseCVS dialog for you.)
  5. Enter a
     . 
    (full-stop / period) into the Module entry
  6. Click OK.

Tortoise will now download the latest source tree of SEPY for you. You'll find the SEPY source code in the C:\SEPYCVS\sciTE folder

You can run SEPY from the source directly:

Open a cmd window and from the c:\SEPYCVS\SciTE\ folder type

 python main.pyw 

This will run SEPY direct from python...

If you would like to build an exe from the source type...

 make_wx25_py053.bat 

You may get an error running make_wx25_py053.bat if so it's just that it is expecting a folder to be available, so if this is your first checkout of SEPY you need to create the folder... C:\SEPYCVS\bin_2.5\main

So from the C:\SEPYCVS folder...

 
 md bin_2.5
 cd bin_2.5
 md main
 cd \SEPYCVS\scite

And then try running make_wx25_py053.bat again.

If all goes to plan you will have a SEPY.exe file in the C:\SEPYCVS\bin_2.5\main folder which you can now run...