Commit 81239661 authored by Sam Rushing's avatar Sam Rushing

set compile_time_env here rather than in _coro.pyx

various neatenings
parent 39313cb5
...@@ -20,7 +20,6 @@ except ImportError: ...@@ -20,7 +20,6 @@ except ImportError:
) )
sys.exit (-1) sys.exit (-1)
include_dir = os.getcwd() include_dir = os.getcwd()
def newer(x, y): def newer(x, y):
...@@ -47,6 +46,14 @@ def check_lio(): ...@@ -47,6 +46,14 @@ def check_lio():
status = os.system('test/build/test_lio') status = os.system('test/build/test_lio')
return exit_ok(status) return exit_ok(status)
compile_time_env = {
'COMPILE_LIO': check_lio(),
'COMPILE_NETDEV' : False,
'COMPILE_LZO' : False,
'COMPILE_LZ4' : False,
'CORO_DEBUG': False,
}
setup ( setup (
name='coro', name='coro',
version='1.0.2-000', version='1.0.2-000',
...@@ -69,40 +76,34 @@ setup ( ...@@ -69,40 +76,34 @@ setup (
'coro._coro', 'coro._coro',
['coro/_coro.pyx', 'coro/swap.c'], ['coro/_coro.pyx', 'coro/swap.c'],
extra_compile_args = ['-Wno-unused-function'], extra_compile_args = ['-Wno-unused-function'],
depends=(glob.glob('coro/*.pyx') + depends = (
glob.glob('coro/*.pxi') + glob.glob('coro/*.pyx') +
glob.glob('coro/*.pxd') + glob.glob('coro/*.pxi') +
[os.path.join(include_dir, 'pyrex', 'python.pxi'), glob.glob('coro/*.pxd') + [
os.path.join(include_dir, 'pyrex', 'pyrex_helpers.pyx'), os.path.join(include_dir, 'pyrex', 'python.pxi'),
os.path.join(include_dir, 'include', 'pyrex_helpers.h'), os.path.join(include_dir, 'pyrex', 'pyrex_helpers.pyx'),
os.path.join(include_dir, 'pyrex', os.path.join(include_dir, 'include', 'pyrex_helpers.h'),
'tsc_time_include.pyx'), os.path.join(include_dir, 'pyrex', 'tsc_time_include.pyx'),
os.path.join(include_dir, 'include', 'tsc_time.h'), os.path.join(include_dir, 'include', 'tsc_time.h'),
os.path.join(include_dir, 'pyrex', 'libc.pxd'), os.path.join(include_dir, 'pyrex', 'libc.pxd'),
] ]
), ),
pyrex_include_dirs=[ pyrex_include_dirs=[
os.path.join(include_dir, '.'), os.path.join(include_dir, '.'),
os.path.join(include_dir, 'pyrex'), os.path.join(include_dir, 'pyrex'),
], ],
#include_dirs=[os.path.join(include_dir, 'pyrex')],
include_dirs=[ include_dirs=[
os.path.join(include_dir, '.'), os.path.join(include_dir, '.'),
os.path.join(include_dir, 'include'), os.path.join(include_dir, 'include'),
], ],
#pyrex_compile_time_env={'COMPILE_LIO': check_lio(), pyrex_compile_time_env = compile_time_env,
# 'CORO_DEBUG': True, # to enable LZO|LZ4 for stack compression, set COMPILE_LZO|COMPILE_LZ4 above
# },
# to enable LZO|LZ4 for stack compression, set COMPILE_LZO|COMPILE_LZ4 in coro/_coro.pyx
# and uncomment one of the following: # and uncomment one of the following:
#libraries=['lzo2', 'z'] #libraries=['lzo2', 'z']
#libraries=['lz4', 'z'], #libraries=['lz4', 'z'],
libraries=['z'] libraries=['z']
), ),
Extension( Extension ('coro.oserrors', ['coro/oserrors.pyx', ],),
'coro.oserrors',
['coro/oserrors.pyx', ],
),
Extension ('coro.dns.packet', ['coro/dns/packet.pyx', ],), Extension ('coro.dns.packet', ['coro/dns/packet.pyx', ],),
Extension ( Extension (
'coro.clocks.tsc_time', 'coro.clocks.tsc_time',
...@@ -116,7 +117,7 @@ setup ( ...@@ -116,7 +117,7 @@ setup (
], ],
packages=['coro', 'coro.clocks', 'coro.http', 'coro.dns'], packages=['coro', 'coro.clocks', 'coro.http', 'coro.dns'],
package_dir = { package_dir = {
# '': 'coroutine', # '': 'coroutine',
'coro': 'coro', 'coro': 'coro',
'coro.clocks': 'coro/clocks', 'coro.clocks': 'coro/clocks',
'coro.dns': 'coro/dns', 'coro.dns': 'coro/dns',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment