Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: inercia/evy
base: b6b8c7e62b
...
head fork: inercia/evy
compare: 7a8f5f6452
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 10 files changed
  • 0 commit comments
  • 1 contributor
Commits on Nov 19, 2012
Alvaro Minor updates in the unit tests a0551cd
Alvaro . f668a54
Alvaro Minor compilation flags 4612c31
Alvaro Build improvements
There is a bug in CFFI that prevents us from packaging things...
7a8f5f6
View
2  MANIFEST.in
@@ -1,4 +1,4 @@
recursive-include tests *.py *.crt *.key
recursive-include doc *.rst *.txt *.py Makefile *.png
recursive-include examples *.py *.html
-include MANIFEST.in README.twisted NEWS AUTHORS LICENSE README
+include MANIFEST.in NEWS AUTHORS LICENSE README
View
14 Makefile
@@ -48,8 +48,8 @@ clean:
rm -rf build dist
rm -rf *.egg-info __pycache__
rm -rf Library
- rm -rf doc/_build doc/__pycache__
rm -f `find . -name '*.pyc'`
+ rm -rf `find . -name '__pycache__'`
make -C libuv clean
make -C doc clean
@@ -81,3 +81,15 @@ dist:
@echo ">>> redistributable package left in dist/"
+sdist:
+ @echo ">>> Making redistributable sources package..."
+ $(PYTHON) setup.py sdist
+ @echo ">>> redistributable package left in dist/"
+
+sdist-upload: sdist
+ @echo ">>> Uploading redistributable sources package to PyPI..."
+ $(PYTHON) setup.py sdist upload
+
+sdist-register: sdist
+ @echo ">>> Registering package at PyPI..."
+ $(PYTHON) setup.py register
View
2  README
@@ -27,5 +27,5 @@ The built html files can be found in doc/_build/html afterward.
Status
======
-It doesn't work yet...
+Most of the unit tests are running now, but it doesn't work yet...
View
7 evy/uv/interface.py
@@ -37,6 +37,7 @@
LIBUV_INC_DIR = os.path.join(LIBUV_DIR, 'include')
LIBUV_LIB_DIR = LIBUV_DIR
+EXTENSION_PACKAGE = 'evy'
from cffi import FFI
@@ -605,7 +606,7 @@
if sys.platform in ['linux', 'linux2']:
extra_link_args += ['-lrt']
if sys.platform in ['darwin']:
- extra_compile_args += ["-U__llvm__", "-arch x86_64", "-arch i386"]
+ extra_compile_args += ['-U__llvm__', '-arch x86_64', '-arch i386']
extra_link_args += ['-framework CoreServices']
@@ -614,9 +615,9 @@
""",
include_dirs = [LIBUV_INC_DIR],
extra_compile_args = extra_compile_args,
- libraries = ["uv"],
+ libraries = ['uv'],
library_dirs = [LIBUV_LIB_DIR],
- ext_package = 'evy.uv', # must match the package defined in setup.py
+ ext_package = EXTENSION_PACKAGE, # must match the package defined in setup.py
extra_link_args = extra_link_args)
View
14 setup.py
@@ -1,10 +1,11 @@
#!/usr/bin/env python
-import sys
+try:
+ from setuptools import setup, find_packages
+except ImportError:
+ from distutils.core import setup, find_packages
-from setuptools import find_packages
-from distutils.core import setup
from setup_libuv import libuv_build_ext, libuv_sdist, libuv_extension
@@ -23,7 +24,10 @@
url = 'http://github.com/inercia/evy',
packages = find_packages(exclude = ['tests', 'benchmarks']),
- install_requires = ['dnspython'],
+
+ install_requires = ['setuptools',
+ 'dnspython'
+ ],
zip_safe = False,
long_description = open(
@@ -36,7 +40,7 @@
cmdclass = {'build_ext': libuv_build_ext,
'sdist' : libuv_sdist},
- ext_package = 'evy.uv', # must match the package defined in the CFFI verify()
+ ext_package = 'evy', # must match the package defined in the CFFI verify()
ext_modules = [libuv_extension],
test_suite = 'nose.collector',
View
45 setup_libuv.py
@@ -10,6 +10,7 @@
except ImportError:
from distutils.core import Extension, setup
+
from distutils.command.build_ext import build_ext
from distutils.command.sdist import sdist as _sdist
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
@@ -19,7 +20,7 @@
__here__ = os.path.dirname(__file__)
-
+#: where the libuv is found...
LIBUV_DIR = os.path.join(__here__, 'libuv')
@@ -29,7 +30,14 @@ def _system(cmd):
sys.stdout.write('Running %r in %s\n' % (cmd, os.getcwd()))
return os.system(cmd)
-def make(done=[]):
+
+def make(done = []):
+ """
+ Run the make proccess in the libuv directory
+
+ :param done:
+ :return:
+ """
print 'making libuv'
if not done:
@@ -43,13 +51,12 @@ def make(done=[]):
new_ldflags = ""
prev_ldflags = os.environ.get("LDFLAGS", "")
- if sys.platform == "darwin":
- new_cflags = new_cflags + " -U__llvm__ -arch x86_64 -arch i386"
- new_ldflags = new_cflags + " -framework CoreServices"
+ if sys.platform == 'darwin':
+ new_cflags = new_cflags + ' -O3 -U__llvm__ -arch x86_64 -arch i386'
+ new_ldflags = new_ldflags + ' -framework CoreServices'
+ elif sys.platform in ['linux', 'linux2']:
+ new_cflags = new_cflags + ' -fPIC '
- if sys.platform in ["linux", "linux2"]:
- new_cflags = new_cflags + " -fPIC"
-
os.environ["CFLAGS"] = ("%s %s" % (prev_cflags, new_cflags)).lstrip()
os.environ["LDFLAGS"] = ("%s %s" % (prev_ldflags, new_ldflags)).lstrip()
@@ -76,20 +83,28 @@ def run(self):
class libuv_build_ext(build_ext):
-
- def build_extension(self, ext):
+ """
+ Builder for the libuv 'extension'
+ """
+
+ def build_extensions(self):
+ """
+ Runs the builder
+ """
print 'building libuv extension'
make()
import evy.uv.interface
- libuv_modules = [evy.uv.interface.ffi.verifier.get_extension()]
+ libuv_extension = evy.uv.interface.ffi.verifier.get_extension()
+ self.extensions = [libuv_extension]
print 'using libuv version: %s' % evy.uv.get_version()
- return libuv_modules
+ print '(build path: %s)' % self.get_ext_fullpath(libuv_extension.name)
+
+
-libuv_extension = Extension(name='libuv', sources=[])
+libuv_extension = Extension(name = 'libuv',
+ sources = [])
-class BuildFailed(Exception):
- pass
View
2  tests/test_debug.py
@@ -143,7 +143,7 @@ def test_hub_exceptions (self):
def hurl (s):
s.recv(1)
- {}[1] # keyerror
+ {}[1] # keyerror
fake = StringIO()
orig = sys.stderr
View
2  tests/test_green_pool.py
@@ -35,7 +35,7 @@
import evy
from evy import debug
-from evy import hubs, greenpool, coros, event
+from evy import hubs, greenpool, event
from evy.support import greenlets as greenlet
import tests
View
13 tests/test_greenthread.py
@@ -247,8 +247,6 @@ def accept_once (listenfd):
check_hub()
def test_001_trampoline_timeout (self):
- from evy import coros
-
server_sock = evy.listen(('127.0.0.1', 0))
bound_port = server_sock.getsockname()[1]
@@ -300,17 +298,6 @@ def go ():
check_hub()
- def test_named (self):
- named_foo = greenthread.named('tests.api_test.Foo')
- self.assertEquals(
- named_foo.__name__,
- "Foo")
-
- def test_naming_missing_class (self):
- self.assertRaises(
- ImportError, greenthread.named, 'this_name_should_hopefully_not_exist.Foo')
-
-
def test_killing_dormant (self):
DELAY = 0.1
state = []
View
1  tests/test_proc.py
@@ -35,7 +35,6 @@
warnings.simplefilter('ignore', DeprecationWarning)
warnings.simplefilter('default', DeprecationWarning)
-from evy import coros
from evy import event as _event
from evy import Timeout, sleep, getcurrent, with_timeout
from tests import LimitedTestCase, skipped, silence_warnings

No commit comments for this range

Something went wrong with that request. Please try again.