branch Attitude Adjustment packages
[12.09/packages.git] / lang / pyevent / patches / 000-libenevt_path_from_env.patch
1 diff -ruN pyevent-0.3.pris/setup.py pyevent-0.3/setup.py
2 --- pyevent-0.3.pris/setup.py   2005-09-11 22:44:04.000000000 -0500
3 +++ pyevent-0.3/setup.py        2007-04-23 11:17:14.500323500 -0500
4 @@ -5,9 +5,13 @@
5  from distutils.core import setup, Extension
6  import glob, os, sys
7  
8 -if glob.glob('/usr/lib/libevent.*'):
9 -    print 'found system libevent for', sys.platform
10 -    event = Extension(name='event',
11 +# Where to find libevent
12 +libevent_location = os.environ.get('LIBEVENT_HOME')
13 +
14 +if libevent_location != None:
15 +    if glob.glob('%s/libevent.*' % (libevent_location,)):
16 +        print 'found system libevent for', sys.platform
17 +        event = Extension(name='event',
18                         sources=[ 'event.c' ],
19                         libraries=[ 'event' ])
20  elif glob.glob('%s/lib/libevent.*' % sys.prefix):