[C++-sig] Installing Pyste.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Jul 3 12:11:45 CEST 2003


Before starting to use Pyste I wanted to install it in a common
location instead of running it off Boost's CVS tree.  I find it easier
to manage packages when I can install them somewhere.  To this end I
wrote a trivial setup_pyste.py using distutils that works.  Its not
great but works.  Here is what I did:

Use the following setup_pyste.py

# --------------------
import os
from distutils.core import setup

boost_base_dir = "/path/to/your/boost/dir"

pyste_src_dir = os.path.join(boost_base_dir,

setup (name              = "Pyste",
       version           = "1.0",
       description       = "Pyste - Python Semi-Automatic Exporter",
       maintainer        = "Bruno da Silva de Oliveira",
       maintainer_email  = "nicodemus at globalite.com.br",
       licence           = "Boost License",
       long_description  = "Pyste is a Boost.Python code generator",
       url               = "http://www.boost.org/libs/python/pyste/index.html",
       platforms         = ['Any'],
       packages          = ['Pyste'],
       scripts           = ['pyste.py'],
       package_dir       = {'Pyste': pyste_src_dir}
# --------------------

This installs Pyste inside <prefix>/site-packages/Pyste.  I wrote a
simple wrapper pyste.py script to use this like so:

# --------------------
#!/usr/bin/env python

import time
import sys
from Pyste import pyste

if __name__ == '__main__':
    start = time.clock()
    status = pyste.Main()
    print '%0.2f seconds' % (time.clock()-start)
# --------------------

Make this executable and finally do:

python setup_pyste.py install

to install Pyste.  Finally add a __init__.py into

It would be nice if something like this were included the repository.

Thanks for Boost.Python and Pyste!  


More information about the Cplusplus-sig mailing list