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

setup.py: minor non-functional changes

parent f9040405
...@@ -11,23 +11,23 @@ ev_dir = None ...@@ -11,23 +11,23 @@ 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],
libraries=['event']) libraries=['event'])
else: 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,37 +47,38 @@ else: ...@@ -47,37 +47,38 @@ 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,
extra_objects=ev_extobjs, extra_objects=ev_extobjs,
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__':
name='gevent', setup(
version=version, name='gevent',
description='Python network library that uses greenlet and libevent for easy and scalable concurrency', version=version,
author='Denis Bilenko', description='Python network library that uses greenlet and libevent for easy and scalable concurrency',
author_email='denis.bilenko@gmail.com', author='Denis Bilenko',
packages=['gevent'], author_email='denis.bilenko@gmail.com',
ext_modules=[libevent], packages=['gevent'],
classifiers=[ ext_modules=[gevent_core],
"License :: OSI Approved :: MIT License", classifiers=[
"Programming Language :: Python", "License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X", "Programming Language :: Python",
"Operating System :: POSIX", "Operating System :: MacOS :: MacOS X",
"Topic :: Internet", "Operating System :: POSIX",
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Internet",
"Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 4 - Beta"] "Intended Audience :: Developers",
) "Development Status :: 4 - Beta"]
)
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