Commit 30872e93 authored by Vitja Makarov's avatar Vitja Makarov

Merge remote branch 'upstream/master'

parents 7283b72f d6027cb2
...@@ -197,10 +197,11 @@ class TestAll(GdbDebuggerTestCase): ...@@ -197,10 +197,11 @@ class TestAll(GdbDebuggerTestCase):
return return
out, err = self.p.communicate() out, err = self.p.communicate()
err = err.decode('UTF-8')
border = '*' * 30 border = '*' * 30
start = '%s v INSIDE GDB v %s' % (border, border) start = '%s v INSIDE GDB v %s' % (border, border)
end = '%s ^ INSIDE GDB ^ %s' % (border, border) end = '%s ^ INSIDE GDB ^ %s' % (border, border)
errmsg = '\n%s\n%s%s' % (start, err.decode('UTF-8'), end) errmsg = '\n%s\n%s%s' % (start, err, end)
self.assertEquals(0, self.p.wait(), errmsg) self.assertEquals(0, self.p.wait(), errmsg)
sys.stderr.write(err) sys.stderr.write(err)
......
...@@ -426,7 +426,7 @@ def run_unittest_in_module(modulename): ...@@ -426,7 +426,7 @@ def run_unittest_in_module(modulename):
"debugging information. Either compile python with " "debugging information. Either compile python with "
"-g or get a debug build (configure with --with-pydebug).") "-g or get a debug build (configure with --with-pydebug).")
warnings.warn(msg) warnings.warn(msg)
os._exit(1) os._exit(0)
else: else:
m = __import__(modulename, fromlist=['']) m = __import__(modulename, fromlist=[''])
tests = inspect.getmembers(m, inspect.isclass) tests = inspect.getmembers(m, inspect.isclass)
......
__version__ = "0.14+" __version__ = "0.14.1rc1"
# Void cython.* directives (for case insensitive operating systems). # Void cython.* directives (for case insensitive operating systems).
from Cython.Shadow import * from Cython.Shadow import *
include MANIFEST.in README.txt INSTALL.txt ToDo.txt USAGE.txt include MANIFEST.in README.txt INSTALL.txt ToDo.txt USAGE.txt
include COPYING.txt LICENSE.txt Makefile include COPYING.txt LICENSE.txt Makefile
include .hgrev include .gitrev
include setup.py include setup.py
include setupegg.py include setupegg.py
include bin/* include bin/*
...@@ -16,6 +16,7 @@ include Demos/embed/* ...@@ -16,6 +16,7 @@ include Demos/embed/*
include Demos/freeze/* include Demos/freeze/*
include Demos/libraries/* include Demos/libraries/*
include Demos/Makefile* include Demos/Makefile*
recursive-include Cython/Debugger/Tests/*
recursive-include Tools * recursive-include Tools *
recursive-include tests *.pyx *.pxd *.pxi *.py *.h *.BROKEN bugs.txt recursive-include tests *.pyx *.pxd *.pxi *.py *.h *.BROKEN bugs.txt
recursive-include tests *_lib.cpp *.srctree recursive-include tests *_lib.cpp *.srctree
......
PYTHON?=python PYTHON?=python
REPO = http://hg.cython.org/cython-devel REPO = git://github.com/cython/cython.git
all: local all: local
local: local:
${PYTHON} setup.py build_ext --inplace ${PYTHON} setup.py build_ext --inplace
.hg: REV := $(shell cat .hgrev) .git: REV := $(shell cat .gitrev)
.hg: TMPDIR := $(shell mktemp -d tmprepo.XXXXXX) .git: TMPDIR := $(shell mktemp -d tmprepo.XXXXXX)
.hg: .git:
hg clone --rev $(REV) $(REPO) $(TMPDIR) git clone $(REPO) $(TMPDIR)
hg -R $(TMPDIR) update cd $(TMPDIR); git checkout -b working $(REV)
mv $(TMPDIR)/.hg . mv $(TMPDIR)/{.git,.hgtags,.hgignore} .
mv $(TMPDIR)/.hgignore . mv $(TMPDIR)/Doc/s5 Doc/s5
mv $(TMPDIR)/.hgtags .
rm -rf $(TMPDIR) rm -rf $(TMPDIR)
repo: .hg repo: .git
clean: clean:
......
...@@ -78,6 +78,15 @@ VER_DEP_MODULES = { ...@@ -78,6 +78,15 @@ VER_DEP_MODULES = {
'run.special_methods_T561_py2']), 'run.special_methods_T561_py2']),
} }
# files that should not be converted to Python 3 code with 2to3
KEEP_2X_FILES = [
os.path.join('Cython', 'Debugger', 'Tests', 'test_libcython_in_gdb.py'),
os.path.join('Cython', 'Debugger', 'Tests', 'test_libpython_in_gdb.py'),
os.path.join('Cython', 'Debugger', 'libcython.py'),
os.path.join('Cython', 'Debugger', 'libpython.py'),
]
INCLUDE_DIRS = [ d for d in os.getenv('INCLUDE', '').split(os.pathsep) if d ] INCLUDE_DIRS = [ d for d in os.getenv('INCLUDE', '').split(os.pathsep) if d ]
CFLAGS = os.getenv('CFLAGS', '').split() CFLAGS = os.getenv('CFLAGS', '').split()
...@@ -931,9 +940,15 @@ def refactor_for_py3(distdir, cy3_dir): ...@@ -931,9 +940,15 @@ def refactor_for_py3(distdir, cy3_dir):
graft Cython graft Cython
recursive-exclude Cython * recursive-exclude Cython *
recursive-include Cython *.py *.pyx *.pxd recursive-include Cython *.py *.pyx *.pxd
recursive-include Cython/Debugger/Tests *
include runtests.py
''') ''')
sys.path.insert(0, cy3_dir) sys.path.insert(0, cy3_dir)
for keep_2x_file in KEEP_2X_FILES:
destfile = os.path.join(cy3_dir, keep_2x_file)
shutil.copy(keep_2x_file, destfile)
class PendingThreadsError(RuntimeError): class PendingThreadsError(RuntimeError):
pass pass
......
...@@ -3,15 +3,8 @@ from distutils.sysconfig import get_python_lib ...@@ -3,15 +3,8 @@ from distutils.sysconfig import get_python_lib
import os, os.path import os, os.path
import sys import sys
if 'sdist' in sys.argv and sys.platform != "win32" and sys.version_info >= (2,4): if 'sdist' in sys.argv and sys.platform != "win32":
# Record the current revision in .hgrev assert os.system("git show-ref -s HEAD > .gitrev") == 0
import subprocess # os.popen is cleaner but deprecated
changeset = subprocess.Popen("hg identify --id --rev tip".split(),
stdout=subprocess.PIPE).stdout.read()
rev = changeset.decode('ISO-8859-1').strip()
hgrev = open('.hgrev', 'w')
hgrev.write(rev)
hgrev.close()
if sys.platform == "darwin": if sys.platform == "darwin":
# Don't create resource files on OS X tar. # Don't create resource files on OS X tar.
......
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