Merge branch 'master' into kgiusti-python3 Conflicts: proton-c/bindings/python/setup.py tests/python/proton_tests/sasl.py
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/0d1da5cf Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/0d1da5cf Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/0d1da5cf Branch: refs/heads/kgiusti-python3 Commit: 0d1da5cf90425edce70663f49e4cb31220d65977 Parents: d09e93e 5b611b7 Author: Ken Giusti <kgiu...@apache.org> Authored: Wed Jun 17 15:25:57 2015 -0400 Committer: Ken Giusti <kgiu...@apache.org> Committed: Wed Jun 17 15:25:57 2015 -0400 ---------------------------------------------------------------------- proton-c/CMakeLists.txt | 2 +- proton-c/bindings/python/setup.py | 58 +++++++++++++++++++++-- proton-c/bindings/python/setuputils/misc.py | 1 + proton-c/bindings/ruby/lib/core/ssl.rb | 18 ++++--- proton-c/bindings/ruby/lib/core/transport.rb | 5 +- proton-c/bindings/ruby/ruby.i | 13 +---- proton-c/src/sasl/sasl-internal.h | 2 +- proton-c/src/sasl/sasl.c | 11 +++-- proton-c/src/windows/schannel.c | 53 ++++++++++++++++----- tests/python/proton_tests/common.py | 28 ++++++++++- tests/python/proton_tests/sasl.py | 40 ---------------- 11 files changed, 147 insertions(+), 84 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0d1da5cf/proton-c/bindings/python/setup.py ---------------------------------------------------------------------- diff --cc proton-c/bindings/python/setup.py index 1738a14,0a77872..1620b38 --- a/proton-c/bindings/python/setup.py +++ b/proton-c/bindings/python/setup.py @@@ -97,8 -117,22 +117,23 @@@ class Configure(build_ext) else: return compiler.compiler_type + def prepare_swig_wrap(self): + ext = self.distribution.ext_modules[-1] + + try: + # This will actually call swig to generate the files + # and list the sources. + self.swig_sources(ext.sources, ext) + except (errors.DistutilsExecError, errors.DistutilsPlatformError) as e: + if not (os.path.exists('cproton_wrap.c') or + os.path.exists('cproton.py')): + raise e + + ext.sources = ext.sources[1:] + ext.swig_opts = [] + def bundle_libqpid_proton_extension(self): + setup_path = os.path.dirname(os.path.realpath(__file__)) base = self.get_finalized_command('build').build_base build_include = os.path.join(base, 'include') install = self.get_finalized_command('install').install_base http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0d1da5cf/tests/python/proton_tests/common.py ---------------------------------------------------------------------- diff --cc tests/python/proton_tests/common.py index 8bb3609,11bea85..857cb50 --- a/tests/python/proton_tests/common.py +++ b/tests/python/proton_tests/common.py @@@ -26,28 -26,8 +26,29 @@@ import sys, os, string, subproces from proton import Connection, Transport, SASL, Endpoint, Delivery, SSL from proton.reactor import Container from proton.handlers import CHandshaker, CFlowController + from string import Template +if sys.version_info[0] == 2 and sys.version_info[1] < 6: + # this is for compatibility, apparently the version of jython we + # use doesn't have the next() builtin. + # we should remove this when we upgrade to a python 2.6+ compatible version + # of jython + #_DEF = object() This causes the test loader to fail (why?) + class _dummy(): pass + _DEF = _dummy + + def next(iter, default=_DEF): + try: + return iter.next() + except StopIteration: + if default is _DEF: + raise + else: + return default + # I may goto hell for this: + import __builtin__ + __builtin__.__dict__['next'] = next + def free_tcp_ports(count=1): """ return a list of 'count' TCP ports that are free to used (ie. unbound) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/0d1da5cf/tests/python/proton_tests/sasl.py ---------------------------------------------------------------------- diff --cc tests/python/proton_tests/sasl.py index b4e9c7a,7f1e7ad..b5d30ab --- a/tests/python/proton_tests/sasl.py +++ b/tests/python/proton_tests/sasl.py @@@ -16,16 -16,13 +16,14 @@@ # specific language governing permissions and limitations # under the License. # +from __future__ import absolute_import -import sys, os, common +import sys, os +from . import common - from string import Template - import subprocess from proton import * -from common import pump, Skipped - -from cproton import * +from .common import pump, Skipped +from proton._compat import str2bin def _sslCertpath(file): """ Return the full path to the certificate,keyfile, etc. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org