setup.py
author Tero Marttila <terom@fixme.fi>
Sun, 16 Aug 2009 19:01:21 +0300
changeset 7 74fde84264b1
parent 6 10bd48c9b6ce
child 8 b3880dafbab1
permissions -rw-r--r--
broke Cython with this package magic
1
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
from distutils.core import setup
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
from distutils.extension import Extension
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
from Cython.Distutils import build_ext
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
def cython_ext (name, files, **opts) :
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
    return Extension(name, files, include_dirs=['inc'], **opts)
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
setup(
7
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
     9
    name            = 'qmsk.net',
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    10
    version         = '0.0.1',
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    11
    description     = "Python network programming re-invented",
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    12
    author          = "Tero Marttila",
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    13
    author_email    = "terom@fixme.fi",
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    14
    url             = "http://projects.qmsk.net/qmsk.net",
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    15
    
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    16
    # for python code
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    17
    packages        = [
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    18
        'qmsk.net.socket',
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    19
        'qmsk.net.sctp',
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    20
    ],
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    21
    
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    22
    # override build_ext to use Cython
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    23
    cmdclass        = {'build_ext': build_ext},
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    24
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    25
    # describe Cython modules
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    26
    ext_package     = 'qmsk.net',
1
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
    ext_modules = [
7
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    28
        cython_ext("libc",              ["qmsk/net/libc.pyx"]),
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    29
        cython_ext("py",                ["qmsk/net/py.pyx"]),
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    30
        cython_ext("socket.addr",       ["qmsk/net/socket/addr.pyx"]),
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    31
        cython_ext("socket.socket",     ["qmsk/net/socket/socket.pyx"]),
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    32
        cython_ext("sctp.sock",         ["qmsk/net/sctp/sock.pyx"], libraries=['sctp']),
74fde84264b1 broke Cython with this package magic
Tero Marttila <terom@fixme.fi>
parents: 6
diff changeset
    33
        cython_ext("sctp.constants",    ["qmsk/net/sctp/constants.pyx"]),
1
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    34
    ]
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    35
)
0ca9278146d7 move pxd's to inc dir, split off sctp.pxd
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    36