setup.py
author Tero Marttila <terom@fixme.fi>
Sun, 16 Aug 2009 19:20:55 +0300
changeset 8 b3880dafbab1
parent 7 74fde84264b1
child 10 94b0d5a208c1
permissions -rw-r--r--
phew, things are working
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

def cython_ext (name, files, **opts) :
    return Extension(name, files, include_dirs=['inc'], **opts)

setup(
    name            = 'qmsk.net',
    version         = '0.0.1',
    description     = "Python network programming re-invented",
    author          = "Tero Marttila",
    author_email    = "terom@fixme.fi",
    url             = "http://projects.qmsk.net/qmsk.net",
    
    # for python code
    packages        = [
        'qmsk.net.socket',
        'qmsk.net.sctp',
    ],
    
    # override build_ext to use Cython
    cmdclass        = {'build_ext': build_ext},

    # describe Cython modules
#    ext_package     = 'qmsk.net',
    ext_modules = [
        cython_ext("qmsk.net.libc",             ["qmsk/net/libc.pyx"]),
        cython_ext("qmsk.net.py",               ["qmsk/net/py.pyx"]),
        cython_ext("qmsk.net.socket.addr",      ["qmsk/net/socket/addr.pyx"]),
        cython_ext("qmsk.net.socket.socket",    ["qmsk/net/socket/socket.pyx"]),
        cython_ext("qmsk.net.sctp.sock",        ["qmsk/net/sctp/sock.pyx"], libraries=['sctp']),
        cython_ext("qmsk.net.sctp.constants",   ["qmsk/net/sctp/constants.pyx"]),
    ]
)