On Mon, Sep 29, 2003 at 06:35:35PM +0100, Mikhail Sobolev wrote:
> Can you please be a bit more specific: did you change the files outside
> of mk4py?  I mean, can I just take the tree that corresponds to the
> python interface and build it against the library installed in my
> system (debian unstable)?

No, the Python interface actually requires it be built from a Metakit
build tree - it links directly against the individual Metakit object
files, instead of against the Metakit library as a whole.  So
Mk4py.{so,sl,dll} ends up containing the Metakit library as well as
the Python interface.  This was part of the setup.py script before I
changed it, so I assumed there was some good reason for it and didn't
change it.  Perhaps I was wrong. :)

Here's the build process I used on a Debian unstable system:

~/src% curl -O http://web.sabi.net/temp/metakit-2.4.9.2+njr2.tar.gz
[...]
~/src% tar zxf metakit-2.4.9.2+njr2.tar.gz 
~/src% cd metakit-2.4.9.2+njr2/builds 
~/src/metakit-2.4.9.2+njr2/builds% python -V
Python 2.3+
~/src/metakit-2.4.9.2+njr2/builds% ../unix/configure --with-python=/usr
[...]
~/src/metakit-2.4.9.2+njr2/builds% make
[...]

If you want to test:
~/src/metakit-2.4.9.2+njr2/builds% curl -O http://web.sabi.net/temp/regrtest.py
~/src/metakit-2.4.9.2+njr2/builds% sudo install regrtest.py /usr/lib/python2.3/test
~/src/metakit-2.4.9.2+njr2/builds% make test-python
python ../unix/../python/test/all.py
test_inttypes
test_string
test_unittest
All 3 tests OK.

Once you've run configure/make (with or without the --with-python
option), you can also use Distutils to build.

~/src/metakit-2.4.9.2+njr2/builds% cd ../python 
~/src/metakit-2.4.9.2+njr2/python% python setup.py build
[...]
~/src/metakit-2.4.9.2+njr2/python% python setup.py test 
running test
running build
running build_py
running build_ext
running config
gcc -pthread -E -I/usr/include/python2.3 -o _configtest.i _configtest.c
removing: _configtest.c _configtest.i
test_inttypes
test_string
test_unittest
All 3 tests OK.

Then use 'make install' and 'python setup.py install' (if you used
Distutils) to install.

-- 
=Nicholas Riley <[EMAIL PROTECTED]> | <http://www.uiuc.edu/ph/www/njriley>
_______________________________________________
metakit mailing list  -  [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to