Commit d0be3cba authored by Jason Madden's avatar Jason Madden

Hmm, gcc failed on travis. Try not parallel the cython part.

parent 82e3709a
/* Copyright (c) 2011-2012 Denis Bilenko. See LICENSE for details. */ /* Copyright (c) 2011-2012 Denis Bilenko. See LICENSE for details. */
#ifdef Py_PYTHON_H #ifdef Py_PYTHON_H
#if 0
#define _GEVENTLOOP struct __pyx_vtabstruct_8corecext_loop #define _GEVENTLOOP struct __pyx_vtabstruct_8corecext_loop
#else
#define _GEVENTLOOP struct __pyx_vtabstruct_6gevent_8corecext_loop
#endif
static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context) { static void gevent_handle_error(struct PyGeventLoopObject* loop, PyObject* context) {
PyThreadState *tstate; PyThreadState *tstate;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
import os import os
import os.path
import re import re
import traceback import traceback
import datetime import datetime
...@@ -22,7 +23,10 @@ class Thread(threading.Thread): ...@@ -22,7 +23,10 @@ class Thread(threading.Thread):
value = None value = None
def run(self): def run(self):
self.value = self._target(*self._args) target = getattr(self, '_target', None) # Py3
if target is None:
target = getattr(self, '_Thread__target', None)
self.value = target(*self._args)
do_exec = None do_exec = None
if sys.version_info >= (3, 0): if sys.version_info >= (3, 0):
...@@ -71,8 +75,6 @@ def _run_cython_on_file(configuration, pyx_filename, ...@@ -71,8 +75,6 @@ def _run_cython_on_file(configuration, pyx_filename,
output_filename, output_filename,
counter, lines, counter, lines,
cache=None): cache=None):
# XXX: Note that this causes cython to generate
# a "corecext" name instead of "gevent.corecext"
value = ''.join(lines) value = ''.join(lines)
sourcehash = md5(value.encode("utf-8")).hexdigest() sourcehash = md5(value.encode("utf-8")).hexdigest()
comment = format_tag(frozenset(configuration)) comment = format_tag(frozenset(configuration))
...@@ -80,14 +82,17 @@ def _run_cython_on_file(configuration, pyx_filename, ...@@ -80,14 +82,17 @@ def _run_cython_on_file(configuration, pyx_filename,
raise ValueError("output cannot be absolute") raise ValueError("output cannot be absolute")
# We can't change the actual name of the pyx file because # We can't change the actual name of the pyx file because
# cython generates function names based in that string. # cython generates function names based in that string.
# XXX: Note that this causes cython to generate
# a "corecext" name instead of "gevent.corecext"
tempdir = tempfile.mkdtemp() tempdir = tempfile.mkdtemp()
#unique_pyx_filename = pyx_filename #os.path.join(tempdir, pyx_filename) unique_pyx_filename = pyx_filename
#unique_output_filename = output_filename #os.path.join(tempdir, output_filename) unique_output_filename = output_filename
unique_pyx_filename = os.path.join(tempdir, pyx_filename) #unique_pyx_filename = os.path.join(tempdir, pyx_filename)
unique_output_filename = os.path.join(tempdir, output_filename) #unique_output_filename = os.path.join(tempdir, output_filename)
dirname = os.path.dirname(unique_pyx_filename) # output must be in same dir dirname = os.path.dirname(unique_pyx_filename) # output must be in same dir
log("Output filename %s", unique_output_filename) log("Output filename %s", unique_output_filename)
if dirname: if dirname and not os.path.exists(dirname):
print("Making dir", dirname) print("Making dir", dirname)
os.makedirs(dirname) os.makedirs(dirname)
try: try:
...@@ -116,7 +121,7 @@ def _run_cython_on_files(pyx_filename, py_banner, banner, output_filename, prepr ...@@ -116,7 +121,7 @@ def _run_cython_on_files(pyx_filename, py_banner, banner, output_filename, prepr
counter, lines, counter, lines,
cache))) cache)))
threads[-1].start() threads[-1].start()
#threads[-1].join() threads[-1].join()
for t in threads: for t in threads:
t.join() t.join()
......
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