Commit 7a07a226 authored by Denis Bilenko's avatar Denis Bilenko

setup.py: minor non-functional changes

parent f9040405
...@@ -11,12 +11,12 @@ ev_dir = None ...@@ -11,12 +11,12 @@ ev_dir = None
if ev_dir is None and ( glob.glob('/usr/lib/libevent*') or glob.glob('/usr/lib64/libevent*') ): if ev_dir is None and ( glob.glob('/usr/lib/libevent*') or glob.glob('/usr/lib64/libevent*') ):
print 'found system libevent for', sys.platform print 'found system libevent for', sys.platform
libevent = Extension(name=name, gevent_core = Extension(name=name,
sources=sources, sources=sources,
libraries=['event']) libraries=['event'])
elif ev_dir is None and glob.glob('%s/lib/libevent.*' % sys.prefix): elif ev_dir is None and glob.glob('%s/lib/libevent.*' % sys.prefix):
print 'found installed libevent in', sys.prefix print 'found installed libevent in', sys.prefix
libevent = Extension(name=name, gevent_core = Extension(name=name,
sources=sources, sources=sources,
include_dirs=['%s/include' % sys.prefix], include_dirs=['%s/include' % sys.prefix],
library_dirs=['%s/lib' % sys.prefix], library_dirs=['%s/lib' % sys.prefix],
...@@ -25,9 +25,9 @@ else: ...@@ -25,9 +25,9 @@ else:
if ev_dir is None: if ev_dir is None:
l = glob.glob('../libevent*') l = glob.glob('../libevent*')
l.reverse() l.reverse()
for dir in l: for path in l:
if os.path.isdir(dir): if os.path.isdir(path):
ev_dir = dir ev_dir = path
break break
if ev_dir: if ev_dir:
print 'found libevent build directory', ev_dir print 'found libevent build directory', ev_dir
...@@ -47,7 +47,7 @@ else: ...@@ -47,7 +47,7 @@ else:
else: else:
ev_extobjs = glob.glob('%s/*.o' % dir) ev_extobjs = glob.glob('%s/*.o' % dir)
libevent = Extension(name=name, gevent_core = Extension(name=name,
sources=sources, sources=sources,
include_dirs=ev_incdirs, include_dirs=ev_incdirs,
extra_compile_args=ev_extargs, extra_compile_args=ev_extargs,
...@@ -55,21 +55,22 @@ else: ...@@ -55,21 +55,22 @@ else:
libraries=ev_libraries) libraries=ev_libraries)
else: else:
sys.stderr.write("\nWARNING: couldn't find libevent installation or build directory: assuming system-wide libevent is installed.\n\n") sys.stderr.write("\nWARNING: couldn't find libevent installation or build directory: assuming system-wide libevent is installed.\n\n")
libevent = Extension(name=name, gevent_core = Extension(name=name,
sources=sources, sources=sources,
libraries=['event']) libraries=['event'])
version = re.search("__version__\s*=\s*'(.*)'", open('gevent/__init__.py').read(), re.M).group(1).strip() version = re.search("__version__\s*=\s*'(.*)'", open('gevent/__init__.py').read(), re.M).group(1).strip()
assert version, version assert version, version
setup( if __name__ == '__main__':
setup(
name='gevent', name='gevent',
version=version, version=version,
description='Python network library that uses greenlet and libevent for easy and scalable concurrency', description='Python network library that uses greenlet and libevent for easy and scalable concurrency',
author='Denis Bilenko', author='Denis Bilenko',
author_email='denis.bilenko@gmail.com', author_email='denis.bilenko@gmail.com',
packages=['gevent'], packages=['gevent'],
ext_modules=[libevent], ext_modules=[gevent_core],
classifiers=[ classifiers=[
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Programming Language :: Python", "Programming Language :: Python",
......
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