william-os4y / fapws2

Fast asynchronous python web server (based on libevent) — Read more

This URL has Read+Write access

pjstevns (author)
Tue Dec 23 05:18:00 -0800 2008
william-os4y (committer)
Fri Dec 26 06:29:35 -0800 2008
commit  5752af742b763517ce0a52d0f0c00b40b186edf8
tree    99d5b87018e11979dd417fcf40686f92e7ee33ef
parent  ff9e6025ad655e6fb3b6e46b0fedd43732feba9c
fapws2 / setup.py
100644 61 lines (49 sloc) 2.122 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from setuptools import setup, find_packages, Extension
import sys, os
 
version = '0.3'
 
 
if os.environ.has_key('LIBEVENT_SRC'):
    libevent_src = os.environ['LIBEVENT_SRC']
else:
    libevent_src = './libevent'
 
if not os.path.exists('/usr/lib/libevent.so'):
    print "We don't find libevent installed!!!!"
    sys.exit(1)
print "We will use the followinf libevent sources:"
print libevent_src
print ""
 
 
def read_file(name):
    return open(os.path.join(os.path.dirname(__file__),name)).read()
 
readme = read_file('README')
 
setup(name='fapws2',
      version=version,
      description="fast asynchronous wsgi server",
      long_description=readme,
classifiers=['Development Status :: 4 - Beta','Environment :: Web Environment','License :: OSI Approved :: GNU General Public License (GPL)','Programming Language :: C','Programming Language :: Python','Topic :: Internet :: WWW/HTTP :: HTTP Servers','Topic :: Internet :: WWW/HTTP :: WSGI :: Server'], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
      keywords='',
      author='William',
      author_email='william.os4y@gmail.com',
      url='http://william-os4y.livejournal.com/',
      license='GPL',
      include_package_data=True,
      zip_safe=False,
      install_requires=[
          # -*- Extra requirements: -*-
      ],
      entry_points="""
# -*- Entry points: -*-
""",
 
      packages= find_packages(),
      ext_modules = [
          Extension('_evhttp',
                  sources=['fapws2/_evhttp.c'],
                  # I'm on an archlinux ;-)
                  # Here I'm pointing to the direcoty where libevent has been build
                  # In this directory wi can find sources and compiled objects (as after a "./configure; make")
                  include_dirs=[libevent_src],
                  library_dirs=["/usr/local/lib"], # add LD_RUN_PATH in your environment
                  libraries=['event'],
                  #extra_compile_args=["-march=athlon-xp", "-mtune=athlon-xp", "-ggdb"],
                  #define_macros=[("DEBUG", "1")],
                  )
                  ]
 
 
      )