Klaus Demo bjoern / 0cd4c13
setup.py cleanup, thanks to gorakhargosh for the hints Jonas Haag 9 years ago
1 changed file(s) with 16 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
00 import os
1 import glob
12 from distutils.core import setup, Extension
23
3 SOURCE_FILES = [
4 'http-parser/http_parser.c', 'bjoern/request.c', 'bjoern/bjoernmodule.c',
5 'bjoern/server.c', 'bjoern/wsgi.c'
6 ]
4 SOURCE_FILES = [os.path.join('http-parser', 'http_parser.c')] + \
5 glob.glob(os.path.join('bjoern', '*.c'))
6
7 bjoern_extension = Extension(
8 'bjoern',
9 sources = SOURCE_FILES,
10 libraries = ['ev'],
11 include_dirs = ['http-parser'],
12 define_macros = [('WANT_SENDFILE', '1'),
13 ('WANT_SIGINT_HANDLING', '1')],
14 extra_compile_args = ['-std=c99', '-fno-strict-aliasing', '-Wall',
15 '-Wextra', '-Wno-unused', '-g', '-fPIC']
16 )
717
818 setup(
919 name = 'bjoern',
1626 classifiers = ['Development Status :: 4 - Beta',
1727 'License :: OSI Approved :: BSD License',
1828 'Programming Language :: C',
29 'Programming Language :: Python',
1930 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server'],
20 ext_modules = [
21 Extension(
22 'bjoern',
23 sources=SOURCE_FILES,
24 libraries=['ev'],
25 include_dirs=['http-parser'],
26 define_macros=[('WANT_SENDFILE', '1'), ('WANT_SIGINT_HANDLING', '1')],
27 extra_compile_args='-std=c99 -fno-strict-aliasing -Wall -Wextra -Wno-unused -g -fPIC'.split()
28 )
29 ]
31 ext_modules = [bjoern_extension]
3032 )