add a setup.py

This commit is contained in:
Victor Stinner 2014-11-19 03:10:45 +01:00
parent ecc85c2b0e
commit 5c28a55e01
2 changed files with 89 additions and 4 deletions

41
README
View File

@ -1,6 +1,34 @@
asyncio event loop scheduling callbacks in eventlet.
Implemented:
See also the Trollius project:
http://trollius.readthedocs.org/
Status
------
The version 0.1 is the first public release. It was not tested on any project
yet.
Installation
------------
Requirements:
- eventlet (it was tested with eventlet 0.15)
- trollius 1.0 or newer
Type::
pip install aiogreen
or::
python setup.py install
Implemented
-----------
* call_at()
* call_later()
@ -11,7 +39,9 @@ Implemented:
* stop()
* coroutines and tasks
Not supported:
Not supported (yet)
-------------------
* run an event loop in a thread different than the main thread
* sockets: create_connection, create_server, sock_recv
@ -19,14 +49,17 @@ Not supported:
* subprocesses: need pipes
* signal handlers: add_signal_handler (only for pyevent hub?)
Todo:
To do
-----
* Write new unit tests, or split Tulip test suite between implementation tests
and specification tests
* Support eventlet without monkey-patching
* Test with Python 2 and 3
* Test with Trollius and asyncio
* Glue to ease debug: keep traceback between Handle, coroutine and greenthread
* Glue to ease debug: keep traceback between Handle, coroutine and greenthread.
Is it even possible?
* run_in_executor(): use eventlet.tpool as the default executor?
It avoids the dependency to concurrent.futures. aiogreen is written as a
temporary solution to switch from eventlet to asyncio. So it may be better to

52
setup.py Normal file
View File

@ -0,0 +1,52 @@
# Release procedure:
# - (fill changelog, FIXME: no changelog yet)
# - (run unit tests, FIXME: no test yet)
# - update the version in setup.py to X.Y
# - (set release date in the changelog, FIXME: no changelog yet)
# - check that "python setup.py sdist" contains all files tracked by
# the SCM (Mercurial), or update MANIFEST.in
# - hg ci
# - hg tag X.Y
# - hg push
# - python setup.py sdist bdist_wheel register upload
# - increment version in setup.py
# - hg ci && hg push
import os
import sys
try:
from setuptools import setup, Extension
SETUPTOOLS = True
except ImportError:
SETUPTOOLS = False
# Use distutils.core as a fallback.
# We won't be able to build the Wheel file on Windows.
from distutils.core import setup, Extension
with open("README") as fp:
long_description = fp.read()
install_options = {
"name": "aiogreen",
"version": "0.1",
"license": "Apache License 2.0",
"author": 'Victor Stinner',
"author_email": 'victor.stinner@gmail.com',
"description": "asyncio event loop scheduling callbacks in eventlet.",
"long_description": long_description,
"url": "https://bitbucket.org/haypo/aiogreen/",
"classifiers": [
"Programming Language :: Python",
#"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
],
"packages": ["aiogreen"],
#"test_suite": "runtests.runtests",
}
if SETUPTOOLS:
install_options['install_requires'] = ['eventlet', 'trollius>=1.0']
setup(**install_options)