Пример #1
0
if os.path.exists('twisted'):
    sys.path.insert(0, '.') # eek! need this to import twisted. sorry.
from twisted import copyright
from twisted.python.dist import setup, ConditionalExtension as Extension
from twisted.python.dist import getPackages, getDataFiles, getScripts
from twisted.python.dist import twisted_subprojects, _isCPython, _hasEpoll


extensions = [
    Extension("twisted.test.raiser",
              ["twisted/test/raiser.c"],
              condition=lambda _: _isCPython),

    Extension("twisted.python._epoll",
              ["twisted/python/_epoll.c"],
              condition=lambda builder: (_isCPython and _hasEpoll(builder) and
                                         sys.version_info[:2] < (2, 6))),

    Extension("twisted.internet.iocpreactor.iocpsupport",
              ["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
               "twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c"],
              libraries=["ws2_32"],
              condition=lambda _: _isCPython and sys.platform == "win32"),

    Extension("twisted.python._initgroups",
              ["twisted/python/_initgroups.c"]),
    Extension("twisted.python.sendmsg",
              sources=["twisted/python/sendmsg.c"],
              condition=lambda _: sys.platform != "win32"),
    Extension("twisted.internet._sigchld",
              ["twisted/internet/_sigchld.c"],
Пример #2
0
    print >> sys.stderr, "You must use at least Python 2.6 for Twisted"
    sys.exit(3)

if os.path.exists('twisted'):
    sys.path.insert(0, '.')  # eek! need this to import twisted. sorry.
from twisted import copyright
from twisted.python.dist import setup, ConditionalExtension as Extension
from twisted.python.dist import getPackages, getDataFiles, getScripts
from twisted.python.dist import twisted_subprojects, _isCPython, _hasEpoll

extensions = [
    Extension("twisted.test.raiser", ["twisted/test/raiser.c"],
              condition=lambda _: _isCPython),
    Extension("twisted.python._epoll", ["twisted/python/_epoll.c"],
              condition=lambda builder:
              (_isCPython and _hasEpoll(builder) and sys.version_info[:2] <
               (2, 6))),
    Extension("twisted.internet.iocpreactor.iocpsupport", [
        "twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
        "twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c"
    ],
              libraries=["ws2_32"],
              condition=lambda _: _isCPython and sys.platform == "win32"),
    Extension("twisted.python._initgroups", ["twisted/python/_initgroups.c"]),
    Extension("twisted.python.sendmsg",
              sources=["twisted/python/sendmsg.c"],
              condition=lambda _: sys.platform != "win32"),
    Extension("twisted.internet._sigchld", ["twisted/internet/_sigchld.c"],
              condition=lambda _: sys.platform != "win32"),
]