Skip to content

Commit

Permalink
git-svn-id: http://evserver.googlecode.com/svn/trunk@68 e9bb6d7e-af12…
Browse files Browse the repository at this point in the history
…-11dd-bad7-87afd3b02348
  • Loading branch information
majek04 committed Jan 22, 2009
1 parent f4f81b2 commit 8f16c0e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 316 deletions.
5 changes: 3 additions & 2 deletions Makefile
Expand Up @@ -18,10 +18,11 @@ endif


egg: eggs
eggs: fullclean libeventdll
eggs: clean libeventdll
$(PYTHON) setup.py bdist_egg

all: clean bindings eggs
all: eggs

distclean: fullclean
mrproper: fullclean
fullclean: clean
Expand Down
310 changes: 0 additions & 310 deletions evserver/json.py

This file was deleted.

18 changes: 14 additions & 4 deletions evserver/server.py
Expand Up @@ -3,16 +3,26 @@

import ctypes
import sys
import os
import signal
import utils
from pkg_resources import resource_filename

v = ctypes.libeventbinary_version.replace('-','_').replace('.','_')

oldcwd = os.getcwd()
os.chdir( resource_filename(__name__, '') )

modulename = 'ctypes_event_%s' % v
try:
v = ctypes.libeventbinary_version.replace('-','_').replace('.','_')
libevent = __import__('ctypes_event_%s' % v)
libevent = __import__(modulename)
except (AttributeError, ImportError):
raise Exception("**** libevent ctypes bindings 'ctypes_event.py' are broken - probably wrong version of binary ****\n"+
raise Exception("**** libevent ctypes bindings %r are broken - probably wrong version of binary ****\n" % (modulename,)+
" currently, libevent.so is loaded from %r \n" %(ctypes.libeventbinary,)+
" try to specify different 'libevent.so' using '--libevent </path/to/libevent.so> \n"+
" if that fails, try to create new ctypes bindings for libevent using 'make bindings'")
" if that fails, try to create new ctypes bindings for libevent using 'make bindings'\n"+
" Tried to load the bindings from directory %r " % (os.getcwd(),) )
os.chdir( oldcwd )


import traceback
Expand Down

0 comments on commit 8f16c0e

Please sign in to comment.